Skip to content

Added Integrated SDKs section to AI Search docs#31799

Merged
aninibread merged 4 commits into
cloudflare:productionfrom
ttmx:cf-docs-aisearch-python-examples
Jul 3, 2026
Merged

Added Integrated SDKs section to AI Search docs#31799
aninibread merged 4 commits into
cloudflare:productionfrom
ttmx:cf-docs-aisearch-python-examples

Conversation

@ttmx

@ttmx ttmx commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added Integrated SDKs section to AI Search docs

Screenshots (optional)

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes. (Internal gchat @aninibread)
  • Files which have changed name or location have been allocated redirects.

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 5 warnings, 💡 3 suggestions found in commit cba3526.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

Warnings (5)
File Issue
ai-search/get-started/python.mdx line 102 Incorrect multipart upload parameter structure — The file argument is passed a dict containing both the file tuple and wait_for_completion. In Python SDK multipart methods the file parameter is the file content tuple (or a files mapping), and non-file form fields such as wait_for_completion should be a separate keyword argument, not nested inside the file dict. Fix: Pass the file tuple directly to file and move wait_for_completion to a top-level keyword argument: file=("getting-started.md", b"...", "text/markdown"), wait_for_completion=True.
ai-search/get-started/python.mdx line 125 Inconsistent AI Search options parameter name — The search call uses aisearch_options, but every other AI Search example in the repo (REST API, Workers binding, retrieval/filtering docs) uses ai_search_options as the request-body key. Since the Python SDK is generated from the same OpenAPI spec, its keyword argument should match the snake_case body property ai_search_options. Fix: Change aisearch_options to ai_search_options to match the documented request shape.
ai-search/get-started/integrated-sdks.mdx line 54 Likely incorrect Python SDK parameter name — The Python example passes aisearch_options (no underscore), but the REST API field and every TypeScript/Workers example in the docs use ai_search_options. Python SDK parameters typically match the API field names, so this will likely raise an unexpected keyword argument error. Fix: Change aisearch_options to ai_search_options in the Python search example.
ai-search/get-started/integrated-sdks.mdx line 67 Incorrect file upload parameter structure — The Python upload example nests both the multipart file tuple and wait_for_completion inside a single file dict. wait_for_completion is a separate polling option (mirrored by uploadAndPoll() in TypeScript and the Go SDK's WaitForCompletion parameter), not part of the file field, so this structure is likely invalid. Fix: Pass the file tuple directly to file and wait_for_completion=True as its own keyword argument, e.g. file=("getting-started.md", b"...", "text/markdown"), wait_for_completion=True.
changelog/ai-search/2025-06-30-integrated-sdks.mdx line 6 Date mismatch between filename and frontmatter — The changelog filename uses 2025-06-30-integrated-sdks.mdx but the frontmatter date field is set to 2026-06-30. Fix: Align the date frontmatter value with the filename date or rename the file to match the intended publication date.

Conventions

Checks PR title, description, and redirect checklist.

No convention issues found.

Style Guide Review

Suggestions (3)
File Issue
ai-search/get-started/python.mdx line 17 Bullet list has fewer than three items — Prerequisites section uses a bulleted list with only two items. Fix: Consider rewriting the two prerequisites as prose.
ai-search/get-started/python.mdx line 95 Semicolon joins two independent clauses — Line uses a semicolon between two independent clauses (...may be running; the file continues...). Fix: Break the sentence into two separate sentences.
ai-search/get-started/integrated-sdks.mdx line 221 Code Blocks - Component Alternatives — Raw jsonc block on line 221 contains Wrangler configuration keys including `compatibility_date` and `ai_search_namespaces` Fix: Use `<WranglerConfig>` instead of a raw jsonc block for Wrangler configuration.

Redirects

No missing redirect entries found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.

@aninibread

Copy link
Copy Markdown
Contributor

/bonk review the code snippets and the docs changes

@ask-bonk ask-bonk Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work adding the Python SDK and Workers binding guides. The structure is clean and consistent with the existing get-started pages.

I found two likely code bugs in the Python example and one style guide issue in the Workers example:

Comment thread src/content/docs/ai-search/get-started/python.mdx Outdated
Comment thread src/content/docs/ai-search/get-started/python.mdx
Comment thread src/content/docs/ai-search/get-started/workers.mdx Outdated
@ask-bonk

ask-bonk Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Posted a review on PR #31799 with three inline suggestions:

  1. Python search example — Changed aisearch_options (missing underscore) to ai_search_options to match the REST API field and Workers binding.
  2. Python upload example — Moved wait_for_completion out of the file dict and passed it as a standalone keyword argument, since it’s a polling option rather than a multipart file field.
  3. Workers output block — Replaced the ```sh output language string with ```txt to comply with the style guide (use txt for generic output).

github run

@aninibread aninibread merged commit 24a55d0 into cloudflare:production Jul 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants