Skip to content

Function: webSearchToolSpec()

webSearchToolSpec(provider, overrides?): object

Resolve the effective WebSearchProviderSpec for a provider: the built-in default, with any operator override (the webSearchTools map, keyed by provider) shallow-merged over it. An override may replace just the request fragment or also the api. An override that is not one of those two fields is a deployment mistake that would otherwise be silently dropped, so it throws.

WebSearchProvider

Record<string, unknown>

object

api: "responses" | "chat"

request: Record<string, unknown>