ContentWebSearchToolResult - TypeScript SDK

ContentWebSearchToolResult type definition

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

Example Usage

1import { ContentWebSearchToolResult } from "@openrouter/sdk/models";
2
3let value: ContentWebSearchToolResult = {
4 content: [
5 {
6 encryptedContent: "enc_content_0",
7 title: "Example Page",
8 type: "web_search_result",
9 url: "https://example.com",
10 },
11 ],
12 toolUseId: "<id>",
13 type: "web_search_tool_result",
14};

Fields

FieldTypeRequiredDescriptionExample
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"}
contentmodels.MessagesMessageParamContentUnion3✔️N/A
toolUseIdstring✔️N/A
type”web_search_tool_result”✔️N/A