Get Claude Code and Codex Running with Chinese Models in Just 2 Minutes
Many developers struggle to use Claude Code or Codex because foreign accounts are unavailable, costs are prohibitive, and login risks exist, but by installing the free open‑source CC Switch tool and configuring it with domestic providers such as DeepSeek, Qwen, or GLM, you can switch models in minutes and keep the original AI‑coding experience alive.
CC Switch overview
CC Switch is a free, open‑source, cross‑platform desktop tool that visualises and manages the configuration of AI coding utilities such as Claude Code, Codex, Gemini CLI and OpenCode. It ships with more than 50 preset model providers—including DeepSeek, Qwen, Kimi, Zhipu GLM and MiniMax—so users can switch models with a few clicks instead of editing JSON, TOML or .env files manually.
GitHub repository: https://github.com/farion1231/cc-switch
Installation
macOS : brew install --cask cc-switch Windows : download the .msi installer from the GitHub Releases page and run it.
Linux : download the appropriate .deb, .rpm or .AppImage package for your distribution and install it.
After installation, launch CC Switch; its main window appears on the desktop or in the system tray.
Prepare a DeepSeek API key
Register on the DeepSeek Open Platform, navigate to the API‑Keys page, create a new key and copy it immediately (the key is shown only once).
Connecting DeepSeek to Claude Code
Install Claude Code (requires Node.js): npm install -g @anthropic-ai/claude-code Open CC Switch, select the Claude tab, click “Add Provider”, and choose the preset DeepSeek . Paste the API key; other fields are pre‑filled (default model is DeepSeek‑V4‑Pro , which has stronger agent capabilities than the Flash variant). Optionally enable the 1 M token context mode.
Save the configuration. CC Switch writes the settings into Claude Code’s settings.json. Restart Claude Code and query “What model are you?”; a correct reply confirms the switch.
Connecting DeepSeek to Codex
Install Codex CLI: npm install -g @openai/codex Open CC Switch, select the Codex tab, click “Add Provider”, and choose the preset DeepSeek . Paste the same API key; keep other fields at their defaults.
Enable “Local Routing” in CC Switch. The routing flow becomes:
Codex → CC Switch → DeepSeek → CC Switch → CodexCC Switch acts as a lightweight proxy that translates Codex’s OpenAI Responses API calls into DeepSeek’s Chat Completions API.
Save the configuration, restart Codex CLI, and query “What model are you?”. The answer will be generated by DeepSeek even though Codex still reports itself as a GPT‑5 model.
Switching back or using other providers
To revert, disable the local route and re‑enable the default configuration. The same workflow applies to any other model that offers an Anthropic‑compatible endpoint: select the appropriate preset or create a custom one in CC Switch, paste the API key, and (for Codex) enable local routing.
By automating configuration file edits, CC Switch eliminates manual JSON/TOML/.env modifications and enables rapid experimentation with affordable domestic large‑language models while preserving the original Claude Code or Codex workflow.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
