Skip to main content
The Claude model provides access to Anthropic’s Claude models.

Parameters

ParameterTypeDefaultDescription
idstr"claude-3-5-sonnet-20241022"The id of the Anthropic Claude model to use
namestr"Claude"The name of the model
providerstr"Anthropic"The provider of the model
max_tokensOptional[int]4096Maximum number of tokens to generate in the chat completion
thinkingOptional[Dict[str, Any]]NoneConfiguration for the thinking (reasoning) process
temperatureOptional[float]NoneControls randomness in the model’s output
stop_sequencesOptional[List[str]]NoneA list of strings that the model should stop generating text at
top_pOptional[float]NoneControls diversity via nucleus sampling
top_kOptional[int]NoneControls diversity via top-k sampling
cache_system_promptOptional[bool]FalseWhether to cache the system prompt for improved performance
extended_cache_timeOptional[bool]FalseWhether to use extended cache time (1 hour instead of default)
request_paramsOptional[Dict[str, Any]]NoneAdditional parameters to include in the request
mcp_serversOptional[List[MCPServerConfiguration]]NoneList of MCP (Model Context Protocol) server configurations
api_keyOptional[str]NoneThe API key for authenticating with Anthropic
default_headersOptional[Dict[str, Any]]NoneDefault headers to include in all requests
client_paramsOptional[Dict[str, Any]]NoneAdditional parameters for client configuration
clientOptional[AnthropicClient]NoneA pre-configured instance of the Anthropic client
async_clientOptional[AsyncAnthropicClient]NoneA pre-configured instance of the async Anthropic client
I