Key configuration (click to copy)
Base URL
https://api.deepseek.com
Reasoning model
deepseek-reasoner
Coding model
deepseek-coder
Claude Code Alternative: Connecting to DeepSeek via a Compatible API
Who it's for
- Developers already used to CLI agent workflows
- Those who want to keep multi-turn task loops and file-level editing capabilities
- Anyone who wants to switch the model to a domestic compatible API
Prerequisites
- A working Claude Code-style CLI environment
- A DeepSeek API Key
- A writable local environment variable configuration
Key configuration
- Base URL:
https://api.deepseek.com - Reasoning model:
deepseek-reasoner - Coding model:
deepseek-coder
Setup steps
- Locate where the CLI agent reads model configuration or environment variables.
- Switch the provider to OpenAI-compatible mode.
- Enter the Base URL, API Key, and default model.
- Smoke-test with a single-file editing task first, then move on to multi-file edits and command execution chains.
Troubleshooting
- If tool-calling is unstable, shorten the task chain and reduce the context sent at once.
- If output drifts too much, split tasks into smaller pieces and specify target files explicitly.
- If you hit compatibility errors, confirm the client does not hard-depend on a proprietary field.
Cost note
CLI agent costs fluctuate more than in-editor Q&A. For complex task scenarios, set a budget cap in advance.
配置完成?Setup complete?
前往官方平台开通服务,开始使用 AI 编程。Head to the official site to activate the service and start AI coding.