DeepSeek has no CLI shell of its own, and that is not a gap but a deliberate product-architecture choice: the model runs as a backend to someone else's host - Claude Code or Copilot CLI - rather than trying to compete with them at the level of its own shell. Its compatibility is dual: DeepSeek responds to both the Anthropic API and the OpenAI API, so wiring it in either case comes down to environment variables, and orchestration is taken entirely from the host. If Claude Code is chosen as the host, then both the subagents and the orchestration pattern itself are exactly the ones described in its section of this reference, with no changes on DeepSeek's part.
Behind the environment stands a genuinely large model, and here it is worth moving from settings to architecture: V4-Pro at 1.6 trillion parameters with 49 billion active per token, a separate, noticeably lighter Flash variant, a DSA mechanism with token compression, and a context window of up to a million tokens. These numbers are not decorative: they are exactly what determines what happens to request cost during multi-agent work.
The practical lever here is the CLAUDE_CODE_SUBAGENT_MODEL variable: it is explicitly assigned the cheaper flash variant for subagents, leaving the expensive pro variant to the orchestrator alone, the one holding the whole task. That is a direct, code-free way to lower the cost of multi-agent work without changing anything in Claude Code's own orchestration logic. Next to it in the variable block sits CLAUDE_CODE_AUTO_COMPACT_WINDOW set to 786432 - a setting that accounts for exactly that million-token DeepSeek context when deciding when to automatically compact the conversation history.
The official materials in this section are DeepSeek's guides to integrating specifically with Claude Code and to working through the Anthropic API, a more general overview of integrations with various development tools, and separately the V4-Pro model card for architectural detail.
The ready block of environment variables below includes the base URL to DeepSeek's Anthropic-compatible endpoint, a token, remapping the models to deepseek-v4-pro and deepseek-v4-flash, assigning the flash variant to subagents through CLAUDE_CODE_SUBAGENT_MODEL, and an enlarged auto-compact window. Once these variables are set, the usual Claude Code CLAUDE.md and the usual Claude Code subagents take over from there - orchestration here is entirely the host's, and in that sense the DeepSeek section is worth reading as a direct continuation of the Claude Code section rather than as a separate, self-contained environment.
# DeepSeek via an Anthropic-compatible endpoint (api-docs.deepseek.com).
export ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="<your DeepSeek key>"
export ANTHROPIC_MODEL="deepseek-v4-pro"
export ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4-pro"
export ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4-pro"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4-flash"
export CLAUDE_CODE_SUBAGENT_MODEL="deepseek-v4-flash"
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=786432
# Then - the usual Claude Code CLAUDE.md/subagents:
# orchestration is taken from the host (see the Claude Code section).