VM0VM0
Model Selection

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-key

Once configured, run agents without any additional configuration.

Authentication Options

MethodTypePricing
OAuth Tokenclaude-code-oauth-tokenFixed monthly (Pro/Max subscription)
API Keyanthropic-api-keyPay-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:

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"
VariablePurposeDefault
ANTHROPIC_DEFAULT_OPUS_MODELModel for opus tier or Plan ModeLatest Opus
ANTHROPIC_DEFAULT_SONNET_MODELModel for sonnet tierLatest Sonnet
ANTHROPIC_DEFAULT_HAIKU_MODELModel for haiku tier or background tasksLatest Haiku
CLAUDE_CODE_SUBAGENT_MODELModel for subagentsLatest 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.

Resources