CC-Switch Claude Code
This page only explains one thing: adding or selecting a Provider in CC Switch, then applying it to Claude Code. It is not a direct Claude Code configuration tutorial; if you want to directly modify the Claude Code configuration file, please see Claude Code CLI configuration.
What this page explains
The purpose of CC Switch is to help you centrally manage Providers and synchronize configurations to the target tools. For Claude Code, focus on checking Claude / Anthropic protocol, Key, and model name. Do not directly use OpenAI compatible address as the Claude address unless the provider explicitly states it supports Claude Code.
Confirmation before starting
| Things to confirm | How to view | Why |
|---|---|---|
| Claude Code can now start | Confirm in the terminal or client that Claude Code can open normally | CC Switch only handles switching configurations, it does not handle installing Claude Code |
| The provider supports Claude Code | You can see Claude / Anthropic / Claude Code related instructions in the backend or documentation | Providers that only offer OpenAI-compatible interfaces may not be usable with Claude Code |
| The Key and model name are usable | You can see tokens, Keys, model lists, or available model instructions in the backend | Writing the model name incorrectly will directly lead to model not found |
| Change only one target tool first | Initially, only select Claude Code | It is easier to determine which item has a problem during troubleshooting |
How to fill in the fields
| Setting | Filling Method | Attention Beginners |
|---|---|---|
| Provider Name | Write a name that is easy to recognize | For example, 'Main provider Claude', do not just write numbers |
| Target Tool / Preset | Select Claude Code or Claude-related preset | Do not select Codex, OpenAI, or Gemini |
| Base URL | Copy the API link provided by the provider's backend for Claude / Anthropic | Not all providers share the same Base URL as OpenAI |
| API Key | Copy the full Key generated in the backend | It is also often called token, Key, secret key |
| Model Name | Copy the Claude model name supported by the backend exactly | Do not abbreviate by yourself, and do not change the display name to the model name |
Apply to Claude Code
- Open CC Switch and go to the Provider management area.
- Add a new Provider, or choose a provider configuration you have already created.
- Select the target tool Claude Code related presets.
- Fill in the Provider name, Base URL, API Key, and model name in order.
- After saving, execute Apply / Switch to apply the current Provider to Claude Code.
- If the page prompts that you need to restart the terminal or the target tool, close the current Claude Code session and then reopen it.
Test whether it works
During testing, first send an extremely short question, and do not directly open the real project. As long as it can return normally, it indicates that the Key, Base URL, model name, and target tool synchronization are basically usable.
claude "Please reply only: CC-Switch Claude Code is active" 