Setup guide

Provider setup guide

Browse setup steps and troubleshooting by tool.

Provider setup guide/CC-Switch Claude Code

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 confirmHow to viewWhy
Claude Code can now startConfirm in the terminal or client that Claude Code can open normallyCC Switch only handles switching configurations, it does not handle installing Claude Code
The provider supports Claude CodeYou can see Claude / Anthropic / Claude Code related instructions in the backend or documentationProviders that only offer OpenAI-compatible interfaces may not be usable with Claude Code
The Key and model name are usableYou can see tokens, Keys, model lists, or available model instructions in the backendWriting the model name incorrectly will directly lead to model not found
Change only one target tool firstInitially, only select Claude CodeIt is easier to determine which item has a problem during troubleshooting

How to fill in the fields

SettingFilling MethodAttention Beginners
Provider NameWrite a name that is easy to recognizeFor example, 'Main provider Claude', do not just write numbers
Target Tool / PresetSelect Claude Code or Claude-related presetDo not select Codex, OpenAI, or Gemini
Base URLCopy the API link provided by the provider's backend for Claude / AnthropicNot all providers share the same Base URL as OpenAI
API KeyCopy the full Key generated in the backendIt is also often called token, Key, secret key
Model NameCopy the Claude model name supported by the backend exactlyDo not abbreviate by yourself, and do not change the display name to the model name
If the provider's backend separates different protocols, Claude Code uses the Claude / Anthropic group. Only when the backend explicitly states 'Claude Code uses an OpenAI-compatible address' should it be filled in according to that instruction.

Apply to Claude Code

  1. Open CC Switch and go to the Provider management area.
  2. Add a new Provider, or choose a provider configuration you have already created.
  3. Select the target tool Claude Code related presets.
  4. Fill in the Provider name, Base URL, API Key, and model name in order.
  5. After saving, execute Apply / Switch to apply the current Provider to Claude Code.
  6. 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 Code Minimal Test
claude "Please reply only: CC-Switch Claude Code is active"
If the test fails, check in this priority order: whether the target tool is selected incorrectly, whether the Base URL corresponds to Claude / Anthropic, whether the Key is copied completely, and whether the model name is copied exactly from the backend.