claude --version
~/.claude.json (Windows path: C:\\Users\\<username>\\.claude.json), set hasCompletedOnboarding to true, and skip the official Anthropic login verification.{"hasCompletedOnboarding": true}
settings.json file. The configuration file path varies by system. For details, refer to:~/.claude/settings.jsonuser directory/.claude/settings.jsonsettings.json file does not exist, you can create it manually with a text editor (such as VSCode or Notepad), or run the following command in the terminal to create it:mkdir -p ~/.claude && touch ~/.claude/settings.json
Operating System: Ubuntu 24.04.3 LTS / x86_64
Runtime Version: GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
~/.claude/settings.json.New-Item -ItemType Directory -Force -Path "$HOME\\.claude" | Out-Null; New-Item -ItemType File -Force -Path "$HOME\\.claude\\settings.json" | Out-Null
$HOME\\.claude\\settings.json.settings.json, and replace <USER_API_KEY> and <user domain> with the actual information of the current CMR instance.{"env": {"ANTHROPIC_BASE_URL": "https://<user domain>","ANTHROPIC_AUTH_TOKEN": "<USER_API_KEY>","ANTHROPIC_MODEL": "ModelRouter/auto","ANTHROPIC_DEFAULT_OPUS_MODEL": "ModelRouter/auto","ANTHROPIC_DEFAULT_SONNET_MODEL": "ModelRouter/auto","ANTHROPIC_DEFAULT_HAIKU_MODEL": "ModelRouter/auto","CLAUDE_CODE_SUBAGENT_MODEL": "ModelRouter/auto","ENABLE_TOOL_SEARCH": "false"}}
Environment Variable | Required | Description |
ANTHROPIC_BASE_URL | Yes | API Gateway address for Claude Code requests. |
ANTHROPIC_AUTH_TOKEN | Yes | API Key used for authentication. Replace it with a real API Key created in the CMR console. Keep it secure to prevent leakage. |
ANTHROPIC_MODEL | Yes | Default model name called by Claude Code. This document uses ModelRouter/auto as an example. |
ANTHROPIC_DEFAULT_OPUS_MODEL | No | Model to which the Opus tier (high-complexity tasks) in Claude Code is mapped. |
ANTHROPIC_DEFAULT_SONNET_MODEL | No | Model to which the Sonnet tier (default daily tasks) in Claude Code is mapped. |
ANTHROPIC_DEFAULT_HAIKU_MODEL | No | Model to which the Haiku tier (lightweight/fast tasks) in Claude Code is mapped. |
CLAUDE_CODE_SUBAGENT_MODEL | No | Model used by Claude Code when it creates subtasks (subagents). |
ENABLE_TOOL_SEARCH | No | Whether to enable the built-in native web search tool in Claude Code. |
ANTHROPIC_BASE_URL, enter the domain name of the CMR instance. Do not append /v1/messages. Claude Code automatically constructs the Anthropic Messages request path.ModelRouter/auto indicates that an available model is selected based on the L1 CMR policy. You can also replace each model variable with a model name or intent route name already associated with the current instance.ENABLE_TOOL_SEARCH to false. If internet search is required, configure a search MCP service as needed.cd <project directory>
claude
/status and press Enter to check the current configuration.
Anthropic base URL displays the CMR instance domain and Model displays ModelRouter/auto or the model name you configured.
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback