ToolWebSearch20250305 - TypeScript SDK

ToolWebSearch20250305 type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Example Usage

1import { ToolWebSearch20250305 } from "@openrouter/sdk/models";
2
3let value: ToolWebSearch20250305 = {
4 name: "web_search",
5 type: "web_search_20250305",
6};

Fields

FieldTypeRequiredDescriptionExample
allowedDomainsstring[]N/A
blockedDomainsstring[]N/A
cacheControlmodels.AnthropicCacheControlDirectiveEnable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.{"type": "ephemeral"}
maxUsesnumberN/A
namemodels.NameWebSearch1✔️N/A
typemodels.TypeWebSearch20250305✔️N/A
userLocationmodels.AnthropicWebSearchToolUserLocationN/A{"city": "San Francisco","country": "US","region": "California","timezone": "America/Los_Angeles","type": "approximate"}