Please read this first
Describe the feature
Please add external_web_access: bool | None = None to WebSearchTool and pass it through to the Responses API web_search tool payload.
Background:
- In the OpenAI Responses API,
web_search supports external_web_access: false to disable live internet access and use cached/indexed results only.
- In the current Agents SDK,
WebSearchTool exposes user_location, filters, and search_context_size, but not external_web_access.
- As a result, SDK users cannot explicitly choose cache-only / offline-like behavior when using the built-in web search tool.
Example API:
from agents import Agent, WebSearchTool
agent = Agent(
name="Research agent",
model="gpt-5",
tools=[
WebSearchTool(
search_context_size="medium",
external_web_access=False,
)
],
)
Expected request payload:
{
"type": "web_search",
"search_context_size": "medium",
"external_web_access": False,
}
This would be useful for:
- Workflows that prefer reproducibility and want cached/indexed results only.
- Policy or compliance requirements that do not allow live web access.
- Keeping the Agents SDK aligned with the existing Responses API capability.
Related:
Please read this first
external_web_accesssupport inWebSearchTool.Describe the feature
Please add
external_web_access: bool | None = NonetoWebSearchTooland pass it through to the Responses APIweb_searchtool payload.Background:
web_searchsupportsexternal_web_access: falseto disable live internet access and use cached/indexed results only.WebSearchToolexposesuser_location,filters, andsearch_context_size, but notexternal_web_access.Example API:
Expected request payload:
{ "type": "web_search", "search_context_size": "medium", "external_web_access": False, }This would be useful for:
Related:
feat: Add external_web_access option to WebSearchTool(closed / unmerged)external_web_accesssupport is still missing