AI coding tools
DeepSeek as a Coding Agent Backend
Short answer
- Four coding agents run on DeepSeek as the model backend with official, documented setup: Claude Code, Codex, GitHub Copilot Chat, and OpenCode — the docs' own phrase is that you can "use DeepSeek as the backend model directly — no code required."
- The integrations are not all equal. Codex is the deepest: DeepSeek's API natively speaks the OpenAI Responses API and ships a one-click config script. Claude Code connects through an Anthropic-compatible endpoint, Copilot Chat gets a dedicated VS Code extension, OpenCode has a built-in provider.
- Everything bills at standard API prices — no agent-specific surcharge — and there is a fifth, lesser-known option: DeepSeek Harness, a developer-preview harness for building your own agents.
Which agents are officially supported
DeepSeek maintains four separate integration guides, one per agent, plus a general "Integrate with Agent Tools" note on its first-api-call page. Here is what each connection looks like:
| Agent | How it connects | Models available | Setup |
|---|---|---|---|
| Claude Code | Anthropic-compatible endpoint (environment variables) | deepseek-flash, deepseek-v4-pro (via model mapping) | Export ~9 env vars, run claude |
| Codex (CLI, ChatGPT desktop, VS Code extension) | Native Responses API + one-click setup script | deepseek-flash, deepseek-v4-pro | Run script, pick a menu option |
| GitHub Copilot Chat | Official VS Code extension ("DeepSeek V4 for Copilot Chat") | V4 Pro and Flash in the model picker | Install extension, set API key |
| OpenCode | Built-in provider | DeepSeek-V4-Flash | Type /connect, pick deepseek |
One naming note before anything else: deepseek-flash is the current name for V4.1-Flash (released September 10, 2026, with native multimodal support). The legacy names deepseek-v4-flash and deepseek-v4-flash-vision-exp still work but are routed to V4.1-Flash and billed at the Flash price. V4 Pro, which was slated to retire September 14, stays live after user demand — same billing, per the official changelog.
Claude Code: easy setup, but watch the model mapping
Claude Code talks the Anthropic API, and DeepSeek exposes an Anthropic-compatible endpoint. You point ANTHROPIC_BASE_URL at https://api.deepseek.com/anthropic, put your DeepSeek key in ANTHROPIC_AUTH_TOKEN, and set a handful of model variables. The official recipe pins the main, Opus, and Sonnet slots to deepseek-flash[1m] (the 1M-context variant), with Haiku and the subagent slot on plain deepseek-flash, effort level max, and an auto-compact window of 786,432 tokens — roughly 75% of the 1M window.
The part that actually matters is the fallback mapping. When Claude Code or the Claude Desktop app sends Claude model names, DeepSeek maps them: anything starting with claude-opus goes to deepseek-v4-pro and is billed at the V4 Pro price; claude-sonnet and claude-haiku go to deepseek-flash. If you assumed everything runs at Flash pricing because you set the env vars, a tool that internally requests an Opus-class model will quietly bill you at Pro rates. Check what your workflows actually send.
Two behavior-level extras from the official page: Claude Code's Web Search works natively through DeepSeek's API — but the search-result summarization triggers additional model requests, so those searches cost extra tokens. And the developer mode of the Claude Desktop app can connect to DeepSeek by just changing the base URL and key, bypassing the app's model name restrictions.
Codex: the deepest integration, one script for three clients
Codex normally talks to OpenAI's models over the Responses API. DeepSeek has supported that protocol natively since the July 31, 2026 changelog entry, which says the V4-Flash API is "specifically adapted for Codex." The August 13 entry added a one-click configuration script.
What the script does, per the official docs: it backs up ~/.codex/config.toml to ~/.codex/backup-deepseek/, writes a model catalog (models.json) declaring DeepSeek's models with their context window and reasoning levels, and adds a provider section to config.toml — preserving your existing MCP servers and project trust levels, removing any conflicting fields with a printed reason for each. It validates syntax before writing anything. Menu options: 1 configures deepseek-flash (with image input), 2 configures deepseek-v4-pro, 9 restores your original setup. Re-running the script also cleans out stale entries from older versions (the retired deepseek-v4-flash names).
Configure once and all three Codex clients — the CLI, the ChatGPT desktop app, and the VS Code extension — pick it up, because they share the same config file. The resulting config.toml uses wire_api = "responses" against https://api.deepseek.com/, with reasoning effort defaulting to high (low/high/max are all supported). The declared context window is 1,048,576 tokens with 95% effective — the full 1M, not a trimmed agent slice.
GitHub Copilot Chat and OpenCode: the low-effort options
The Copilot route is a VS Code extension, "DeepSeek V4 for Copilot Chat," that adds V4 Pro and Flash to Copilot Chat's model picker. You keep Copilot's agent mode, tool calling, skills, and MCP — DeepSeek just becomes the model behind them. Requirements: VS Code 1.116+ and any Copilot subscription — the Free tier works. The API key is entered from the command palette and stored in the OS keychain. Thinking effort is set per model in the picker: None (fastest), High (default), or Max.
OpenCode needs no extension at all: version 1.18.30 or later has DeepSeek as a built-in provider. Run opencode, type /connect, enter deepseek, paste your API key, and select DeepSeek-V4-Flash. That's the whole setup.
What running an agent on it actually costs
There is no separate "agent pricing" — requests from coding agents bill at the standard API rates, same as any other call. For agent workloads, three things move the bill more than the sticker price:
- Peak vs. off-peak. Off-peak windows bill at half the peak price. Agents batch well — schedule long runs off-peak and the same task costs half. Our off-peak pricing explainer has the windows and rates.
- Context caching. Agent loops re-send long, mostly-identical prefixes every turn, which is exactly what caching rewards. The cost calculator lets you model hit rates.
- Thinking effort and web search. Effort
maxburns more tokens and latency thanhigh; Claude Code's web search adds summarization requests on top. Neither is hidden billing — both are documented behavior — but they're the two dials agents push hardest.
For point fixes inside your editor rather than full agent runs, DeepSeek also has a separate FIM completion endpoint — see our FIM explainer; it's the cheapest continuous load we've modeled on this site.
One discrepancy worth knowing: does it accept images?
Official pages currently disagree, so we'll quote both. The Codex integration's model catalog declares deepseek-flash with image in its input modalities — "Latest frontier agentic coding model with image input" — and the setup script's option 1 explicitly says the model "also accepts image input." Meanwhile the Copilot extension page states "DeepSeek V4 is text-only" and says the extension proxies dropped screenshots through another installed Copilot model (Claude, GPT-4o) to describe the image before sending anything to DeepSeek.
DeepSeek Harness: the fifth option, for building your own
Quietly mentioned on the same docs page: "DeepSeek Harness is now in developer preview for agent harness developers worldwide." This one isn't an integration into somebody else's tool — it's DeepSeek's own agent harness, with a Web UI and a dsh process that works over a selected workspace directory. You point it at a project, enter your DeepSeek API key in Settings → Models, and the agent can read and edit files, run commands, delegate work, and maintain a plan, asking for approval per the active permission policy. Official guides cover a Python SDK, GitHub review, MCP memory, network proxying, scheduled runs, and plugin development.
One detail that signals its role: DeepSeek's own benchmark numbers are produced using Harness in "minimal mode" — max effort, topp 0.95, temperature 1.0, per the footnotes on the July 31 and August 21 changelog entries. It's not just a tool they ship; it's the reference harness their published agent results are measured through.
Sources: DeepSeek API Docs — Your First API Call · Integrate with Claude Code · Integrate with Codex · Integrate with GitHub Copilot · Integrate with OpenCode · API Changelog · DeepSeek Harness Guide — all pages retrieved and checked 2026-09-19.