web_search()
Create a general-web search tool.
Usage
web_search(
*,
provider="auto",
allowed_engines=None,
default_engine=None,
include_examples=True,
api_key=None,
client=None,
default_params=None,
timeout=None,
mode=SearchResultMode.COMPACT,
name="web_search"
)Parameters
provider: ProviderName | str = "auto"-
Agent SDK adapter name,
"auto", or"function"for a callable. allowed_engines: Iterable[WebSearchEngine | str] | WebSearchEngine | str | None = None-
Web indexes exposed in the model-facing
engineenum. default_engine: WebSearchEngine | str | None = None-
Engine used when the model omits
engine. Defaults to Google Light when it is allowed. include_examples: bool = True-
Add a short call example to the model-facing description.
api_key: str | None = None-
Runtime authentication, custom client, application filters, timeout, and compact or full response selection.
client: str | None = None-
Runtime authentication, custom client, application filters, timeout, and compact or full response selection.
default_params: str | None = None-
Runtime authentication, custom client, application filters, timeout, and compact or full response selection.
timeout: str | None = None-
Runtime authentication, custom client, application filters, timeout, and compact or full response selection.
mode: str | None = None-
Runtime authentication, custom client, application filters, timeout, and compact or full response selection.
name: str = "web_search"- Tool name presented to the model.
Returns
Any-
A provider-native tool whose input fields are
queryandengine.