Switch Claude Code Between AI Providers with One Command
Use DeepSeek, Kimi, GLM, and other models with Claude Code, or juggle multiple Claude accounts, with cc-provider-switcher, a free open-source CLI.
You want to point Claude Code at DeepSeek. Or Kimi, or GLM, or any of the other models that now speak Anthropic’s API. So you open ~/.claude/settings.json and start typing environment variables by hand: ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, then the model mapping that decides which real model answers when Claude Code asks for haiku, sonnet, or opus. Then comes the part everyone forgets: the SUPPORTED_CAPABILITIES flags that tell Claude Code whether the provider can handle extended thinking or effort levels. Get those wrong and nothing errors out loudly. Thinking just stops working, or the provider starts rejecting requests with a vague 400.
And when you want plain Claude back, you get to unwind all of it by hand.
I did this dance for months: a cheaper provider for bulk refactoring, back to Anthropic for the hard problems, and a settings file I broke roughly every third time. Eventually I stopped editing JSON and wrote a tool instead. It’s called cc-provider-switcher, ccs on the command line, and it’s free and open source.
ccs does one narrow thing. It rewrites the env block in your Claude Code settings: base URL, auth token, the haiku/sonnet/opus model mapping, and the capability flags for thinking and effort support. It never touches anything else in the file. Your permissions, hooks, and every other setting stay exactly as you left them. Switching to DeepSeek is ccs deepseek. Switching back is ccs claude.
Install and Quick Start
Install it globally from npm:
npm install -g cc-provider-switcher
Add your API keys once with the interactive setup:
ccs config
The prompt keeps your keys out of shell history, and they land in ~/.ccs/config.json with 0600 permissions. From there, switching is a single command:
ccs deepseek
ccs status
ccs status shows which provider is active, which model your requests actually hit, and which API key is in use. If something feels off, ccs doctor diagnoses common environment problems, and ccs reset strips everything ccs manages back out of your settings file.
Don’t want a global install? Run it straight through npx:
npx cc-provider-switcher deepseek
Using DeepSeek, Kimi, GLM, and Other Models with Claude Code
Here’s what ships out of the box, with each provider’s alias and how it handles reasoning:
| Provider | Alias | Thinking support |
|---|---|---|
| DeepSeek | ds | Effort levels (low/medium/high) |
| MiniMax | mm | Adaptive only |
| Kimi | kimi2 | Effort levels |
| Qwen | none | Effort levels |
| GLM | glm5 | Effort levels |
| Seed/Doubao | doubao | On/off |
| StepFun | sf | Effort levels |
| OpenRouter | or | Depends on the routed model |
| Claude (Anthropic) | anthropic | Native |
The thinking column matters more than it looks. Because ccs sets the capability flags for you, Claude Code’s /effort controls work immediately on providers that support them. Run ccs deepseek and /effort high maps straight to DeepSeek’s reasoning effort. MiniMax decides on its own when to think, so there’s nothing to tune there. Seed/Doubao only toggles thinking on or off.
Each provider also carries its own model mapping, so haiku, sonnet, and opus requests land on sensible defaults. On DeepSeek, for instance, haiku and sonnet route to deepseek-v4-flash while opus gets deepseek-v4-pro. And if a provider ships a new model before ccs catches up, you can override any model ID through providerOverrides in ~/.ccs/config.json, so you don’t have to wait for a release.
Several providers have separate endpoints by region. MiniMax, Kimi, Qwen, and GLM all accept a region argument:
ccs minimax china
ccs kimi global
ccs list prints every available provider, and ccs project <provider> switches only the current project, which is handy when one repo runs on GLM while everything else stays on your default. When you’re done experimenting, one command brings back the native setup:
ccs claude
That puts Anthropic’s own endpoints and model IDs back exactly as they were.
Switching Between Multiple Claude Accounts
This one started as a side feature and turned out to be the thing I use most. If you keep separate Claude subscriptions (one through work, one personal), moving between them normally means logging out and back in, over and over.
ccs can snapshot your current Claude credentials under a name and restore them later:
ccs account save work # save current credentials as "work"
ccs account save personal
ccs account switch work # restore "work"
ccs account list
ccs account delete personal
Saved profiles live in ~/.ccs/accounts/, also locked down to 0600 permissions. The workflow is the same as switching providers: one command, and you skip the whole logout and re-login ritual. If you’ve ever burned through your personal usage limit at 4 p.m. and wished you could hop onto the work account, this is that.
Free, Open Source, and Easy to Extend
cc-provider-switcher is MIT licensed and costs nothing. The code is on GitHub and the package is on npm.
Adding a provider is deliberately boring. Each one is a small JSON entry: a base URL, a model mapping, a key variable, and optionally the thinking capabilities it supports. If your favorite Anthropic-compatible API is missing, open an issue or send a pull request; I want that list to grow.
And if you’ve been putting off trying DeepSeek or GLM with Claude Code because the setup felt fiddly, it’s one command now. That was the whole point.