Skip to main content

Install Node.js (Skip if installed)

Ensure Node.js version ≥ 18.0

Uninstall Other Relay Clients (Optional)

Check installation location:
To uninstall:

Install Claude Code

Verify the installation:

Get Credentials

Smart Routing is an intelligent model routing capability that automatically assigns requests to the most suitable model based on task complexity.See constraints and guidelines
NoteClaude Code cannot connect to models that do not use the \v1\messages protocol. When using Smart Routing, all routing tiers must use Claude-family models.For example, use claude-haiku-4.5, claude-sonnet-5, and claude-opus-5 for the simple, complex, and ultra-complex routing tiers respectively.

Configure Environment Variables

Basic Configuration Example

For Smart Routing, set ANTHROPIC_MODEL="auto"

Dual Model Configuration

Claude Code uses a dual-thread model architecture by default:
  • Main Model: Configured via the ANTHROPIC_MODEL environment variable
    • Used for primary code generation, conversation, and complex tasks
  • Sub Model: Configured via the ANTHROPIC_DEFAULT_HAIKU_MODEL environment variable
    • Purpose: lightweight / fast task model
    • Use cases:
      • Background tasks (file watching, linter checks, etc.)
      • Quick responses (simple questions, completion suggestions)
      • Low-priority auxiliary tasks

Single Model Configuration (Optional)

If you only need one model, there are two configuration methods: Method 1: Set both environment variables to the same model Set both ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL to the same model:
Method 2: Switch the main model using commands after startup Keep the environment variables set as the “Dual Model Configuration” above. After starting Claude Code, enter the following in the interactive interface:
The main thread will switch to use the model configured in ANTHROPIC_DEFAULT_HAIKU_MODEL (i.e., claude-haiku-4-5).

Troubleshooting

Add CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS : 1 to the settings to disable the inclusion of experimental features in the request header.