Connect CC Switch to ModelGo: Setup & Troubleshooting
CC Switch is a desktop tool that manages providers for Claude Code, Codex, and other tools. This guide adds and enables ModelGo for Claude Code. Before you start, install CC Switch and Claude Code, create an API key in the ModelGo console, and pick a logical model name from the Model Catalog.
1. Add a Claude configuration
Open CC Switch, select Claude at the top, and click + on the right.


2. Enter the ModelGo configuration
Paste the following into the configuration editor:
json
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "mgk_your_api_key",
"ANTHROPIC_BASE_URL": "https://api.modelgo.ai",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"API_TIMEOUT_MS": "600000",
"ANTHROPIC_MODEL": "your-model-id",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "your-model-id",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "your-model-id",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "your-model-id"
}
}
3. Save and enable
Name the provider ModelGo, click Add or Save, enable it in the list, then run claude in a terminal and send a simple task.


To check the key and the models it can call:
bash
export MODELGO_API_KEY="mgk_your_api_key"
curl https://api.modelgo.ai/v1/models \
-H "Authorization: Bearer $MODELGO_API_KEY"Troubleshooting
- 401: make sure the token is a valid ModelGo API key with no spaces, line breaks, or leftover old token.
- 403 / model unavailable: the model name must match a logical model name in the Model Catalog exactly and be enabled for your key.
- 404:
ANTHROPIC_BASE_URLmust behttps://api.modelgo.ai, not a full request path. - Claude Code still uses the old profile: confirm the ModelGo profile is enabled, reopen the terminal, and run
claudeagain.