Fix OpenAI stable web search action parameters - #6722
Conversation
🦋 Changeset detectedLatest commit: b575c32 The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughOpenAI web search response conversion now preserves stable action metadata in non-streaming and streaming tool calls. Tests cover generated and streamed responses, and a patch Changesets entry documents the fix. ChangesOpenAI web search action decoding
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Comment |
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
|
@IMax153 Sorry, not sure if you get notifications for resolving the reviews. Also thanks for the reviews 😃 |
Type
Description
Stable OpenAI
web_searchresponses currently become Effect tool calls withparams: {}, whileOpenAiTool.WebSearchrequiresparams.action. A successful provider response therefore fails Effect response decoding withInvalidOutputError: Missing key at ["params"]["action"].This change preserves the existing public tool schema and maps the completed provider action into stable web search tool-call parameters. For streaming responses, the initial
response.output_item.addedevent may not containaction, so the stable tool call is emitted whenresponse.output_item.doneprovides the completed action.WebSearchPreviewkeeps its existing empty-parameter behavior.OpenAI API Reference
OpenAI documents that Responses API web search output includes “a
web_search_calloutput item with the ID of the search call, along with the action taken inweb_search_call.action.”https://platform.openai.com/docs/guides/tools-web-search#output-and-citations
The documented response shape includes:
{ "type": "web_search_call", "id": "ws_...", "status": "completed", "action": { "type": "search", "query": "latest news about AI" } }Testing
gpt-4.1andgpt-5.6model configurations.actionand the completed item supplies it.pnpm test --run: 96 tests passed.pnpm check: passed.pnpm build: passed.git diff --check: passed.Summary by CodeRabbit