Interface: AnthropicLLMParams
@providerprotocol/ai / anthropic / AnthropicLLMParams
Interface: AnthropicLLMParams
Section titled “Interface: AnthropicLLMParams”Defined in: src/providers/anthropic/types.ts:134
Provider-specific parameters for Anthropic Claude models.
These parameters are passed through to the Anthropic Messages API and control model behavior such as sampling, token limits, and extended thinking.
Example
Section titled “Example”const params: AnthropicLLMParams = { max_tokens: 4096, temperature: 0.7, thinking: { type: 'enabled', budget_tokens: 10000 },};Properties
Section titled “Properties”container?
Section titled “container?”
optionalcontainer:string
Defined in: src/providers/anthropic/types.ts:203
Container ID for code execution tool reuse. Pass the container ID from a previous response to reuse the same environment.
max_tokens?
Section titled “max_tokens?”
optionalmax_tokens:number
Defined in: src/providers/anthropic/types.ts:136
Maximum number of tokens to generate. Defaults to model maximum if not specified.
metadata?
Section titled “metadata?”
optionalmetadata:object
Defined in: src/providers/anthropic/types.ts:151
Request metadata for tracking and analytics.
user_id?
Section titled “user_id?”
optionaluser_id:string
Unique identifier for the end user making the request.
service_tier?
Section titled “service_tier?”
optionalservice_tier:"auto"|"standard_only"
Defined in: src/providers/anthropic/types.ts:169
Service tier selection for capacity routing.
auto: Automatically select based on availability (default)standard_only: Only use standard capacity, never priority
stop_sequences?
Section titled “stop_sequences?”
optionalstop_sequences:string[]
Defined in: src/providers/anthropic/types.ts:148
Custom sequences that will cause the model to stop generating.
temperature?
Section titled “temperature?”
optionaltemperature:number
Defined in: src/providers/anthropic/types.ts:139
Sampling temperature from 0.0 (deterministic) to 1.0 (maximum randomness).
thinking?
Section titled “thinking?”
optionalthinking:object
Defined in: src/providers/anthropic/types.ts:157
Extended thinking configuration for complex reasoning tasks.
budget_tokens
Section titled “budget_tokens”budget_tokens:
number
Token budget for the thinking process.
type:
"enabled"
Must be ‘enabled’ to activate extended thinking.
tool_choice?
Section titled “tool_choice?”
optionaltool_choice:object
Defined in: src/providers/anthropic/types.ts:212
Tool selection strategy.
auto: Model decides when to use toolsany: Model must use at least one tooltool: Model must use the specific tool named inname
optionalname:string
type:
"auto"|"tool"|"any"
tools?
Section titled “tools?”
optionaltools:AnthropicBuiltInTool[]
Defined in: src/providers/anthropic/types.ts:197
Built-in tools for server-side execution.
Use the tool helper constructors from the tools namespace:
tools.webSearch()- Web search capabilitytools.computer()- Computer use (mouse, keyboard, screenshots)tools.textEditor()- File viewing and editingtools.bash()- Shell command executiontools.codeExecution()- Sandboxed Python/Bash executiontools.toolSearch()- Dynamic tool catalog search
Example
Section titled “Example”import { anthropic, tools } from 'provider-protocol/anthropic';
const model = llm({ model: anthropic('claude-sonnet-4-20250514'), params: { tools: [ tools.webSearch({ max_uses: 5 }), tools.codeExecution(), ], },});top_k?
Section titled “top_k?”
optionaltop_k:number
Defined in: src/providers/anthropic/types.ts:145
Top-k sampling. Only the k most likely tokens are considered at each step.
top_p?
Section titled “top_p?”
optionaltop_p:number
Defined in: src/providers/anthropic/types.ts:142
Nucleus sampling threshold. Only tokens with cumulative probability <= top_p are considered.