Skip to main content

Environment Variables

Setting MODEL_NAME=anthropic/claude-3-5-sonnet is enough — no need to set OPENAI_BASE_URL. The ANTHROPIC_API_KEY environment variable is consulted; OPENAI_API_KEY is not used as a fallback. If you just want the Anthropic default, setting ANTHROPIC_API_KEY alone is enough — no MODEL_NAME, no llm=. Agent(...) picks anthropic/claude-3-5-sonnet-latest and routes it through litellm. See Provider Auto-Detection.

Models

  • Recommended: claude-3-5-sonnet-20241022 (best balance)
  • Fast/Cheap: claude-3-5-haiku-20241022 (fastest, affordable)
  • Advanced: claude-3-opus-20240229 (highest capability)
  • Latest: claude-sonnet-4-5, claude-haiku-4-5 (newest)

Routed model formats

Claude reached through Bedrock, Vertex AI, or OpenRouter is now detected as Anthropic — not misrouted to the OpenAI adapter — so async streaming works for these prefixes too. See Routed model provider detection for the full detection rules.

Python

With Tools

Multi-Agent

CLI

YAML