CC Switch
CC Switch is an open-source desktop application for centrally managing provider configurations for multiple AI coding tools (Claude Code, Codex, Gemini CLI, etc.). Add your CloudBase provider configuration once in CC Switch, and it becomes available across multiple tools — no separate configuration needed for each.
Prerequisites
- You have activated a TCB environment and obtained the environment ID
cloudBaseEnvID - Enable the required model in the AI console
- Obtain the
Base URLandAPI Keyin the AI console
Configuration Steps
We use CC Switch v3.16.1 as an example.
1. Install CC Switch
- macOS
- Windows
- Linux
Recommended via Homebrew:
brew install --cask cc-switch
Or download CC-Switch-*-macOS.dmg from the Releases page.
Download CC-Switch-*-Windows.msi from the Releases page.
Download from the Releases page:
CC-Switch-*-Linux.deb— Debian/UbuntuCC-Switch-*-Linux.rpm— Fedora/RHEL/openSUSECC-Switch-*-Linux.AppImage— Universal format
2. Add CloudBase as a Provider
- Open the CC Switch desktop app
- Click the + button in the top-right corner and select Add Provider
- Choose Custom Configuration from the presets
- Fill in the following information:
| Field | Description |
|---|---|
| Provider Name | Enter "CloudBase" or a custom name |
| API Key | The API key obtained from the AI console |
| Base URL | Request address: https://{{cloudBaseEnvID}}.api.tcloudbasegateway.com/v1/ai/cloudbase |
- Select the API Format based on the AI tool you are using
Choosing the API Format
CloudBase AI supports the following protocols:
- Anthropic Messages: The native interface protocol for Claude models
- Chat Completions: OpenAI-compatible general-purpose chat protocol
- Responses API: OpenAI's next-generation API, currently only supported by some models
Select the API format based on the AI tool:
| AI Tool | Recommended API Format | Notes |
|---|---|---|
| Claude Code | Anthropic Messages | Native format, no additional setup needed |
| Claude Desktop | Anthropic Messages | Native format, no additional setup needed |
| Codex | Chat Completions | Requires local routing to be enabled |
| Gemini CLI | Chat Completions | General format |
| OpenCode | Chat Completions | General format |
| OpenClaw | Chat Completions | General format |
| Hermes | Chat Completions | General format |
Configuring for Claude Code / Claude Desktop (Anthropic Messages):
Select the Anthropic Messages format (default), paste your CloudBase API Key and Base URL. No advanced options changes needed.
Configuring for Codex (Chat Completions):
-
In the advanced options, switch the API format to Chat Completions
-
Check Needs Local Route Mapping
-
In the model mapping table, enter the model ID (copy an enabled model identifier from the AI console model list)
-
Save the configuration and enable the CloudBase provider
After switching providers, most AI tools require a restart of the terminal or CLI tool. Claude Code supports hot-switching and does not need a restart.