Skip to content

Function: webSearchToolSpec()

webSearchToolSpec(provider, overrides?): WebSearchProviderSpec

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 tool (the common case - a new tool type) 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>

WebSearchProviderSpec