feat: Add external_web_access option to WebSearchTool - #2143
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "filters": tool.filters.model_dump() if tool.filters is not None else None, # type: ignore [typeddict-item] | ||
| "user_location": tool.user_location, | ||
| "search_context_size": tool.search_context_size, | ||
| "external_web_access": tool.external_web_access, | ||
| } |
There was a problem hiding this comment.
Stop sending null external_web_access flag
The new external_web_access option is always included in the payload, even when left at its default None, so every WebSearchTool() call now emits "external_web_access": null (openai_responses.py lines 475‑479). The Responses API expects a boolean and defaults to live access when the field is omitted; sending null will reject the request or bypass the documented default, breaking existing callers that don’t set the flag. The converter should skip the field when it is unset.
Useful? React with 👍 / 👎.
|
It's documented but the SDKs are not yet ready; converted to draft for now |
|
This PR is stale because it has been open for 10 days with no activity. |
|
This PR is stale because it has been open for 10 days with no activity. |
This pull request adds a missing option for web search tool initialization. See https://platform.openai.com/docs/guides/tools-web-search?api-mode=responses#live-internet-access for details.