Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
AnthropicLLM
Claude models from Anthropic, using your Anthropic API key. Good for agents that need strong reasoning, instruction following and tool use. Authenticates with ANTHROPIC_API_KEY from your environment, or an explicitapi_key.
Fields
Claude model name, e.g. “claude-haiku-5-5” or “claude-sonnet-5-5”. Defaults to ‘claude-haiku-5-5’.
Custom Anthropic API endpoint, e.g. for a proxy. Defaults to None (not set).
Sampling temperature, 0 to 1. Ignored on Opus 4.7+, Sonnet 5+ and Fable models. On Claude 4.x set temperature or top_p, not both. Defaults to None (not set).
“auto” lets Claude decide, “required” forces a tool call, “none” disables tools. “required” becomes “auto” on models that disallow forced tool use. Defaults to ‘auto’.
Sample only from the K most likely tokens. Ignored on Opus 4.7+, Sonnet 5+ and Fable models. Defaults to None (not set).
Nucleus sampling probability mass, 0 to 1. Ignored on Opus 4.7+, Sonnet 5+ and Fable models. On Claude 4.x set temperature or top_p, not both. Defaults to None (not set).
Prompt caching for the system prompt, tools and recent turns, cutting cost and latency on long conversations. On (“ephemeral”) by default; set None to turn it off. Defaults to ‘ephemeral’.
Allow (True) or prevent (False) Claude from calling several tools in a single turn. Defaults to None (not set).
Extended thinking settings, passed as given, e.g. {“type”: “adaptive”}, or {“type”: “enabled”, “budget_tokens”: 2048} on older models. Defaults to None (not set).
How much effort Claude spends on a reply: “low”, “medium”, “high”, “xhigh” or “max”. Lower is faster and cheaper. Defaults to None (not set).