DeepSeek Claude Code Integration: Official ANTHROPIC_BASE_URL Config for V4

DeepSeek's official awesome-deepseek-agent docs show the Claude Code ANTHROPIC_BASE_URL setup, Anthropic-compatible API path, V4 Pro/Flash model IDs, and OpenCode/Copilot integration notes for coding-agent routing.

TheRouter Newsroomvia DeepSeek
Technical routing diagram showing DeepSeek V4 API endpoint connecting to Claude Code, GitHub Copilot, and OpenCode coding agents

DeepSeek just published a new official GitHub repository under the deepseek-ai org: awesome-deepseek-agent. It is not a model release or a paper. It is a curated integration playbook — 20 coding tools, each with a dedicated guide for pointing the tool's API client at DeepSeek V4 Pro and V4 Flash.

For teams that manage routing policies across providers, this is the first time DeepSeek has published canonical, centrally-maintained configs for the entire coding-agent ecosystem. The operational implication is immediate: if your team runs Claude Code, GitHub Copilot Chat, OpenCode, Cline, or Codex, there is now an official reference for the exact model IDs and environment variables required to redirect traffic.

What DeepSeek Published

The repository covers 20 tools, including:

  • Claude Code — terminal and VS Code extension
  • GitHub Copilot (via the Vizards VS Code extension, which injects DeepSeek into the model picker)
  • OpenCode — open-source terminal coding agent
  • Cline — VS Code multi-provider coding assistant
  • Codex — OpenAI's coding agent
  • DeepSeek-TUI — Rust terminal assistant, Codex-style architecture, MCP support, 1M context
  • LangCLI — Claude Code-compatible CLI for mainstream LLMs
  • AstrBot — open-source agent for Feishu/Telegram
  • Cherry Studio, LobeHub, nanobot, Kilo Code, and six more

Each guide is a short Markdown file, available in English and Simplified Chinese, with exactly the configuration needed to authenticate against the DeepSeek API and select the right model per role.

The DeepSeek V4 Routing Config That Teams Are Missing

The Claude Code guide in the repo surfaces something that matters for routing operators: DeepSeek maps Anthropic's three-tier model hierarchy (Opus / Sonnet / Haiku) to two V4 models by role. The recommended config:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.deepseek.com/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "***",
    "ANTHROPIC_MODEL": "deepseek-v4-pro[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-v4-pro[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-v4-pro[1m]",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4-flash",
    "CLAUDE_CODE_SUBAGENT_MODEL": "deepseek-v4-flash",
    "CLAUDE_CODE_EFFORT_LEVEL": "max"
  }
}

The key decision here: CLAUDE_CODE_SUBAGENT_MODEL maps sub-agent work to V4 Flash instead of V4 Pro. Sub-agents handle tool execution and parallelized background tasks — the ones that scale up fast in long sessions. By mapping them to the cheaper model, the config cuts the cost tail for extended coding sessions without degrading the primary reasoning loop.

This is a routing policy pattern, not just a setup step. Teams designing provider failover or multi-provider cost control strategies can apply the same role-to-model mapping logic: route orchestration to high-capability models and execution sub-calls to cost-efficient ones, regardless of which agent framework is in play.

Why It Matters for AI Engineering Teams

The awesome-deepseek-agent repo changes three things:

1. Official model IDs, not community guesses. Before this repo, teams had to reconcile conflicting env-var spellings across YouTube tutorials, Medium posts, and forum threads. The deepseek-ai org is now the authority.

2. Anthropic-compatible routing is first-class. DeepSeek's Anthropic-compatible endpoint (api.deepseek.com/anthropic) is documented as the intended path for Claude Code users — not a hack. It supports ANTHROPIC_BASE_URL override natively, which is the same mechanism that routing gateways use to intercept and redirect.

3. Subagent cost control is a documented pattern. The separation of ANTHROPIC_DEFAULT_HAIKU_MODEL and CLAUDE_CODE_SUBAGENT_MODEL from the primary model is now explicit in official docs. Any team that has not already differentiated pricing tiers by agent role has a reference for why and how to do it.

The Router/Operator Angle

For teams using a routing gateway in front of multiple providers — sending some requests to Anthropic Claude Fable 5 and others to DeepSeek V4 depending on cost, latency, or task type — the awesome-deepseek-agent repo introduces a practical concern: credential and endpoint isolation.

Claude Code reads ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN from the environment. If you route requests through a gateway that presents an Anthropic-compatible API surface, those same variables will be used. You need to confirm that your gateway:

  • Forwards the ANTHROPIC_MODEL header or maps it in a routing rule, so the intended model reaches the upstream provider.
  • Logs model IDs accurately at the ledger layer — the [1m] context suffix in deepseek-v4-pro[1m] is a DeepSeek-specific modifier and may need to be stripped or normalized for billing reconciliation.
  • Handles the CLAUDE_CODE_SUBAGENT_MODEL flow correctly if sub-agents make independent API calls — in some gateway configs, sub-agent calls bypass the gateway and go directly to the provider endpoint.

If your team is evaluating DeepSeek V4 as a cost-efficient fallback for coding-agent traffic, the repo's configs give you the exact surface to test against. Map the Anthropic-compatible endpoint to your gateway's provider config, run Claude Code against it, and verify the request log shows V4 Pro for orchestration calls and V4 Flash for sub-agent calls. TheRouter's provider routing docs explain how to define per-role model policies across providers.

What to Watch

  • Model ID deprecation window: deepseek-chat and deepseek-reasoner retire on July 24, 2026. Any existing routing config that still references these names — rather than deepseek-v4-pro or deepseek-v4-flash — will break. The awesome-deepseek-agent configs all use the new names. See our earlier coverage of the DeepSeek V4 migration deadline for the full deprecation timeline and fallback policy checklist.
  • GitHub Copilot integration via extension: The Copilot guide uses a third-party VS Code extension (Vizards), not a first-party Copilot API integration. Teams with strict extension governance policies should evaluate the extension's data handling before deploying.
  • Context suffix behavior: The [1m] suffix in deepseek-v4-pro[1m] activates the 1M-token context window. Without the suffix, the default context window applies. For long-session coding agents, this distinction affects both cost and truncation behavior.

The awesome-deepseek-agent repo is the first centralized, official source for DeepSeek coding-agent integration configs. Bookmark it as the reference to check before any provider migration or routing-policy change involving DeepSeek V4.

Help & contact