Skip to content

docs(ai-gateway): recommend GA web_search tool; correct annotations note#159

Merged
anukiransolur merged 1 commit into
mainfrom
docs/aigateway-web-search-ga
Jul 9, 2026
Merged

docs(ai-gateway): recommend GA web_search tool; correct annotations note#159
anukiransolur merged 1 commit into
mainfrom
docs/aigateway-web-search-ga

Conversation

@dragon3

@dragon3 dragon3 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Corrects the OpenAI web-search guidance added earlier. The previous note recommended web_search_preview and warned that the GA web_search tool "returns empty annotations." That was a test artifact, not a real limitation — GA web_search works and returns citations.

Why

Under the default tool_choice: "auto", the model searches only when it judges a query needs it. For a fact it already knows, it answers directly and annotations come back empty — regardless of which tool (web_search or web_search_preview). When a search actually runs (an unknowable query, or tool_choice: "required"), the GA web_search tool returns web_search_call items and populated url_citation annotations. Verified end-to-end.

Changes

  • Switch the OpenAI example to the GA web_search tool.
  • Replace the incorrect empty-annotations warning with a tip explaining tool_choice: auto vs required.
  • Align the privacy callout to reference web_search.

Gemini google_search section unchanged (verified correct).

Notes

  • Single-file change (docs/guides/ai-gateway.md); no repo-wide fmt. lint passes (pre-existing sitemap.ts warning only).

The previous note told users to prefer web_search_preview because GA
web_search "returns empty annotations." That was a test artifact: under
the default tool_choice:auto the model only searches when it judges a
query needs it, so a well-known fact returns no citations regardless of
which tool. When a search actually runs, GA web_search returns
web_search_call items and url_citation annotations.

- Switch the example to the GA `web_search` tool.
- Replace the incorrect warning with a tip about tool_choice auto vs
  required.
- Align the privacy callout to reference `web_search`.
@dragon3
dragon3 requested a review from a team as a code owner July 7, 2026 23:30
@dragon3 dragon3 self-assigned this Jul 7, 2026
@anukiransolur
anukiransolur merged commit 6674749 into main Jul 9, 2026
3 checks passed
@anukiransolur
anukiransolur deleted the docs/aigateway-web-search-ga branch July 9, 2026 04:54
@dragon3

dragon3 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants