Run Claude Code on DeepSeek, Kimi or GLM
Keep Claude Code's tools and workflow but point it at an Anthropic-compatible model like DeepSeek, Moonshot Kimi or Z.ai GLM with your own API key. Setup for Windows.
Updated November 4, 2026 5 min read
Several model providers offer an Anthropic-compatible API: Claude Code can talk to them as if they were Anthropic. You keep Claude Code's tools, hooks and commands, and pay that provider's (often much lower) price per token. A good split: a cheaper model for refactors, tests and boilerplate, your Claude plan for the hard problems.
The two variables that do it
Claude Code reads ANTHROPIC_BASE_URL (where to send requests) and ANTHROPIC_AUTH_TOKEN (your key for that provider). Set them in one PowerShell window and only that window's Claude Code uses the other model:
PowerShell: DeepSeek
$env:ANTHROPIC_BASE_URL = "https://api.deepseek.com/anthropic" $env:ANTHROPIC_AUTH_TOKEN = "<your DeepSeek API key>" claude
Other providers' Anthropic-compatible endpoints:
- Moonshot (Kimi):
https://api.moonshot.ai/anthropic - Z.ai (GLM):
https://api.z.ai/api/anthropic - MiniMax:
https://api.minimax.io/anthropic
Some providers also want the model name set (ANTHROPIC_MODEL); their docs list the current names. Inside Claude Code, /model shows what it's using.
Keep keys out of scripts you commit. A key in a PowerShell profile or a plain text file is easy to leak.
Local models
Ollama and LM Studio run models on your own PC. They speak the OpenAI format rather than Anthropic's, so Claude Code needs a translating proxy in between to use them.
Things to expect
- Tool use quality varies by model: test on a small task first.
- Context windows differ; very long sessions may need
/compactsooner. - Your Claude subscription isn't used at all while the variables point elsewhere.
What Arcvelt does about it
- Pick the model per session from a list: DeepSeek, Kimi, GLM, MiniMax, OpenRouter, OpenAI, Gemini, Groq, or any Anthropic- or OpenAI-compatible URL. The rest keep running on your Claude plan.
- Local models (Ollama, LM Studio) work through Arcvelt's built-in translation, free on every plan.
- Keys are stored in Windows Credential Manager, not in a text file.
Questions
Is DeepSeek in Claude Code as good as Claude?
For routine work (refactors, tests, boilerplate) many people find it good enough at a fraction of the price. For hard reasoning, Claude models are usually stronger. Try it on your own tasks.
Do I need a Claude subscription for this?
No. Claude Code itself is free to install; with these variables it only talks to the other provider.
Is cloud model routing free in Arcvelt?
Local models are free on both plans. Routing to cloud providers is part of Pro.
Arcvelt
Any model, per session
Choose the model for each Claude Code session from a list, with keys kept in Windows Credential Manager.
Free for 2 agent accounts · no card · no admin rights