How to Run Claude Code and Codex with Chinese Models in 2 Minutes Using CC Switch

This guide shows how to bypass subscription limits and high costs of Claude Code and Codex by configuring them to use domestic large models like DeepSeek via the free, open‑source CC Switch tool, with step‑by‑step installation, API key setup, and model switching.

macrozheng
macrozheng
macrozheng
How to Run Claude Code and Codex with Chinese Models in 2 Minutes Using CC Switch

CC Switch Overview

CC Switch is a free open‑source cross‑platform desktop tool that provides a visual interface for managing the configuration of multiple AI coding tools (Claude Code, Codex, Gemini CLI, OpenCode, etc.). It unifies the JSON, TOML, or .env files required by each tool.

https://github.com/farion1231/cc-switch

Installation

macOS: brew install --cask cc-switch Windows: run the .msi installer from the GitHub Releases page.

Linux: install the appropriate .deb, .rpm or .AppImage package.

After installation launch CC Switch; the 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).

Connect DeepSeek to Claude Code

Install Claude Code: npm install -g @anthropic-ai/claude-code Run claude once; the login will fail without an Anthropic account, which is expected for this workflow.

In CC Switch select the Claude tab, click “Add Supplier”, choose “DeepSeek”, paste the API key, keep other fields at their defaults, optionally enable the 1M‑token mode, and click “Add”. Then enable the DeepSeek model.

Verify the switch by running claude again and asking “What model are you?”. A correct reply confirms the configuration.

Connect DeepSeek to Codex

Install Codex CLI: npm install -g @openai/codex Run codex; the first login also requires an OpenAI account.

In CC Switch select the Codex tab, click “Add Supplier”, choose “DeepSeek”, paste the API key, keep defaults, and enable “Local Routing Mapping”. Save the configuration.

Open the Settings page in CC Switch, turn on the “Routing Switch” and enable the Codex routing option. This starts a lightweight local proxy that translates Codex’s OpenAI Responses API calls into DeepSeek’s Chat Completions API format, making the process transparent to Codex.

Restart Codex and ask “What model are you?”. The answer will still claim a GPT‑5‑based Codex, but the underlying inference runs on DeepSeek.

Using Other Domestic Models

CC Switch includes presets for more than 50 providers (e.g., Qwen, Zhipu GLM, Kimi, MiniMax). To use a different model, select the corresponding preset or create a custom one, fill in the provider’s Base URL and API key, and follow the same enable‑routing steps as for DeepSeek.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

open-sourceDeepSeekAI programmingCodexmodel integrationClaude CodeCC Switch
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.