Claude
Use Claude models directly from Anthropic
Use Claude models directly from Anthropic with full control over model selection.
Quick Setup
# Using OAuth token (requires Claude Pro/Max subscription)
vm0 model-provider setup --type claude-code-oauth-token
# Using API key (pay-per-token)
vm0 model-provider setup --type anthropic-api-keyOnce configured, run agents without any additional configuration.
Authentication Options
| Method | Type | Pricing |
|---|---|---|
| OAuth Token | claude-code-oauth-token | Fixed monthly (Pro/Max subscription) |
| API Key | anthropic-api-key | Pay-per-token |
OAuth Token (Subscription): Get your OAuth token by running claude setup-token in your terminal. Requires Claude Pro or Max subscription.
API Key (Pay-per-use): Get your API key from the Anthropic Console.
Do not set both OAuth token and API key at the same time. This will cause authentication conflicts.
Non-Interactive Setup
# OAuth token
vm0 model-provider setup --type claude-code-oauth-token --credential "your-oauth-token"
# API key
vm0 model-provider setup --type anthropic-api-key --credential "sk-ant-xxx"Model Tier Configuration
For advanced users who want to customize which Claude models are used for different tasks, you can configure model tiers in your vm0.yaml:
version: "1.0"
agents:
my-agent:
framework: claude-code
environment:
ANTHROPIC_DEFAULT_OPUS_MODEL: "claude-opus-4-5-20251101"
ANTHROPIC_DEFAULT_SONNET_MODEL: "claude-sonnet-4-5-20250929"
ANTHROPIC_DEFAULT_HAIKU_MODEL: "claude-haiku-4-5-20251001"
CLAUDE_CODE_SUBAGENT_MODEL: "claude-sonnet-4-5-20250929"| Variable | Purpose | Default |
|---|---|---|
ANTHROPIC_DEFAULT_OPUS_MODEL | Model for opus tier or Plan Mode | Latest Opus |
ANTHROPIC_DEFAULT_SONNET_MODEL | Model for sonnet tier | Latest Sonnet |
ANTHROPIC_DEFAULT_HAIKU_MODEL | Model for haiku tier or background tasks | Latest Haiku |
CLAUDE_CODE_SUBAGENT_MODEL | Model for subagents | Latest Sonnet |
If you don't specify these variables, Claude Code automatically uses the latest available models for each tier.
You must use the full model name (e.g., claude-sonnet-4-5-20250929) in environment variables, not aliases like opus, sonnet, or haiku.