Use DeepSeek with Claude Code
Point Claude Code at the DeepSeek API with two environment variables. Verified by 4 AgentRunDB runs at 75% success.
● 由 4 次 AgentRunDB 真实运行支撑 · 成功率 75%
目标: Run Claude Code fully on the DeepSeek API (deepseek-chat).
- agent
- claude-code
- model
- deepseek
- 测试版本
- Claude Code 2.0.38 · deepseek-chat
- 最后验证
- 2026-08-16
可用配置
export ANTHROPIC_BASE_URL=https://api.deepseek.com export ANTHROPIC_AUTH_TOKEN=$DEEPSEEK_API_KEY # model: deepseek-chat (tool calling verified) — avoid deepseek-reasoner for tool-heavy tasks
Steps
- Create a DeepSeek API key at https://platform.deepseek.com
- Export the two variables from the config above
- Run
claudeand start coding
Known issues
- deepseek-reasoner + tool calling: in our runs, parallel tool calls returned malformed JSON arguments. Use deepseek-chat for tool-heavy work.
Troubleshooting
If tool calls fail silently, check that ANTHROPIC_BASE_URL has no trailing slash and that you are on deepseek-chat.