CC Switch

CC Switch is a desktop provider manager for Claude Code, Codex, Gemini, OpenCode, OpenClaw, and more. This guide uses Claude Code as an example and shows how to add and enable ModelGo.

Before you start

  • Install CC Switch and make sure it opens normally.
  • Install Claude Code and launch it at least once.
  • Create or copy an API key in the ModelGo console.
  • Confirm a logical model name available to your API key in the model catalog.

1. Open the Claude Code configuration

Open CC Switch, select Claude at the top, and click + to add a configuration.

CC Switch overview
Add a Claude configuration in CC Switch

2. Add a ModelGo provider

Paste the following JSON into the configuration editor. Replace your-model-id with a logical model name from the model catalog and sk-your-token with your ModelGo API key:

json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "sk-your-token",
    "ANTHROPIC_BASE_URL": "https://api.modelgo.ai",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1,
    "API_TIMEOUT_MS": 600000,
    "ANTHROPIC_MODEL": "your-model-id",
    "ANTHROPIC_SMALL_FAST_MODEL": "your-model-id"
  },
  "permissions": {
    "allow": [],
    "deny": []
  }
}
Edit the ModelGo configuration in CC Switch

If your CC Switch version supports environment placeholders, you can use {env:MODELGO_API_KEY} for the token and set it in the terminal where you start Claude Code:

bash
export MODELGO_API_KEY="sk-your-token"

Windows PowerShell:

powershell
$env:MODELGO_API_KEY = "sk-your-token"
SettingModelGo value
ANTHROPIC_AUTH_TOKENAPI key created in the ModelGo console
ANTHROPIC_BASE_URLhttps://api.modelgo.ai
ANTHROPIC_MODELA logical model name from the model catalog
ANTHROPIC_SMALL_FAST_MODELThe same callable logical model name

3. Save and enable the provider

Set the provider name to ModelGo, then click Add or Save. Return to the Claude configuration list and enable the ModelGo entry.

Add the ModelGo provider in CC Switch
Enable the ModelGo profile in CC Switch

Start Claude Code:

bash
claude

Enter a simple task such as “Describe this project in three sentences.” A normal response confirms the connection.

4. Verify the configuration

To verify the API key and model access separately:

bash
curl https://api.modelgo.ai/v1/models \
  -H "Authorization: Bearer $MODELGO_API_KEY"

Use an id from the response as the logical model name for ANTHROPIC_MODEL and ANTHROPIC_SMALL_FAST_MODEL.

Troubleshooting

401 or authentication errors

Confirm that the token is a valid ModelGo API key and that the CC Switch profile does not contain an old token. Remove extra spaces or line breaks.

404 or endpoint errors

Set ANTHROPIC_BASE_URL to https://api.modelgo.ai. Do not use https://api.modelgo.ai/v1/messages or a full request path.

Model unavailable

Make sure the model name exactly matches a logical model in the model catalog and is enabled for the API key.

Claude Code still uses the old profile

Confirm that the ModelGo profile is enabled in CC Switch. Fully restart the terminal, then run claude again.

Related docs