docs(ai-gateway): add Web Search page#31658
Conversation
Document the four provider surfaces that expose server-side web search through AI Gateway today (Anthropic, OpenAI Responses, xAI Responses, Alibaba DashScope), plus the search-first provider proxies for Perplexity and Parallel. Sourced from cloudflare/aig/ai-gateway-infra!658, which added Web Search examples for 29 LLMs, and !652 which added the claude-sonnet-4.6 example mirrored by !658. Tool shapes, model lists, and "not currently supported" rationale are taken from those MR captures. Cross-link added from usage/rest-api.mdx just before the "Specify a gateway" section.
Review⏸️ Automatic reviews for this PR are paused. This PR has already received 2 automatic reviews. To run another review, a codeowner can comment
✅ No issues found in commit Code ReviewThis code review is in beta and may not always be helpful — use your judgment. ✅ No code review issues found. Style Guide Review✅ No style-guide issues found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
There was a problem hiding this comment.
Pull request overview
Adds a new AI Gateway “Web Search” usage page documenting provider-native web search support across multiple upstream APIs, and links to it from the main REST API documentation so readers can discover it.
Changes:
- Introduces
usage/web-search.mdxwith provider-by-provider request shapes (Anthropic, OpenAI Responses, xAI Responses, Alibaba Qwen) and guidance for search-first providers (Perplexity, Parallel). - Adds a “Provider tools and web search” section to the REST API page linking to the new Web Search doc.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/content/docs/ai-gateway/usage/web-search.mdx | New documentation page for enabling provider-native web search via AI Gateway endpoints and proxy routes. |
| src/content/docs/ai-gateway/usage/rest-api.mdx | Adds a cross-link to the new Web Search page from the REST API docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
5 style guide issues to address before merge.
- MEDIUM
web-search.mdx:4—descriptionexceeds 160 characters (posted suggestion). - MEDIUM
web-search.mdx:61,107,150,194— Workersenv.AI.runexamples must useTypeScriptExampleinstead of barejavascriptfences. - LOW
rest-api.mdx:220andweb-search.mdx:81,165,240,259— Use "refer to" instead of "see" (posted suggestions).
Note: The PR description and commit message reference internal resources. For future PRs, avoid including internal MR references in this public repository.
|
Review completed. I posted 7 inline review comments on PR #31658 with a mix of suggestions and style notes. Verdict: 5 style guide issues to address before merge. Issues found:
Other notes:
|
Apply review feedback from copilot-pull-request-reviewer and ask-bonk[bot]: - Trim frontmatter description to 148 chars (was ~194, exceeded 160-char limit) - Remove 5 model IDs not present in src/content/catalog-models/: anthropic/claude-opus-4.1, openai/gpt-5-pro, openai/gpt-5.2, openai/gpt-5.2-pro, openai/o3-pro - Wrap all 4 Workers AI binding examples in <TypeScriptExample> with ts code fences (matches worker-binding-methods.mdx convention); add TypeScriptExample import - Replace 5 occurrences of 'see' with 'refer to' (Cloudflare style guide) - Add catalog pointer to the new cross-link in rest-api.mdx
|
Looks good! Left some nits :) |
Address adriandlam's two suggestions on the Anthropic section by switching British 'Summarise' to American 'Summarize'. Extend the spelling fix to the other 6 example prompts in the file for doc-wide consistency. Normalize the xAI section example prompts to ask about Cloudflare (matching Anthropic / OpenAI / Alibaba sections) instead of asking Grok about xAI.
|
Thanks @adriandlam — both |
Summary
Notes
This page is grounded in the captured web search support matrix from
cloudflare/aig/ai-gateway-infra!658and the existing AI Gateway provider docs.Validation
git diff --check upstream/production..HEAD