tool_choice.type instead of wrapping it in { type: "function", function: { name } }.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
ChatServerToolChoice type definition
tool_choice.type instead of wrapping it in { type: "function", function: { name } }.
import { ChatServerToolChoice } from "@openrouter/sdk/models";
let value: ChatServerToolChoice = {
type: "openrouter:web_search",
};
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
type | string | :heavy_check_mark: | OpenRouter server-tool type to force (e.g. openrouter:web_search, web_search, web_search_preview). | openrouter:web_search |