Last updated · Santosh Kumar Radha

Best coding agent for DeepSeek (2026): ten harnesses on one model

With ten coding agents all on DeepSeek V4 Flash, CodeAF solved 62 of 113 DeepSWE tasks at 39.9 cents per solved task. Setup for each agent.

The best coding agent we have measured on DeepSeek is CodeAF by AgentField: in AgentField's DeepSWE comparison, where all ten harnesses ran the same model (deepseek/deepseek-v4-flash-0731 through OpenRouter), CodeAF in senior-dev mode solved 62 of 113 tasks (54.9%) at $0.399 per solved task, the most solves and the lowest cost per solve of the ten. CodeAF is an open-source terminal coding agent by AgentField that runs any model and many tasks at once, each on its own branch. This page shows how each agent connects to DeepSeek, what each one cost per solved task, and when another harness fits better.

At a glance

AgentHow it reaches DeepSeekDeepSWE on DeepSeek V4 Flash (of 113)Per solved task
CodeAF (senior-dev)DeepSeek key in /connect, or OpenRouter62 (54.9%)$0.399
mini-swe-agentLiteLLM model name such as deepseek/deepseek-chat56 (49.6%)$0.769
Codex CLIListed on DeepSeek's integration page; custom provider in config51 (45.1%)$0.828
OpenCodeListed on DeepSeek's integration page; /connect30 (26.5%)$1.899
Claude CodeDeepSeek's Anthropic-format endpoint, ANTHROPIC_BASE_URL16 (14.2%)$1.357
DeepSeek HarnessDeepSeek's own harness, developer preview16 (14.2%)$10.592

Every harness in that comparison ran the same model on the full DeepSWE set with the official verifiers and 3 hours per task. Claude Code and Codex CLI were driving DeepSeek V4 Flash, not their makers' models. The full ten-row table is on the DeepSWE results page.

Which coding agent should I use with DeepSeek?

CodeAF is the agent to start with on DeepSeek if you want the most working patches per dollar: on DeepSeek V4 Flash it solved 62 of 113 DeepSWE tasks, against 56 for mini-swe-agent and 51 for Codex CLI, the next two. The comparison held the model fixed and changed only the harness, so the gap measures what the agent around DeepSeek adds.

The spread between harnesses on one model is large. On the same DeepSeek model and the same tasks, results ran from 62 solved down to 3. Claude Code, built around Claude models, solved 16; OpenCode solved 30. DeepSeek's own harness solved 16 at $10.592 per solved task, 26.6 times CodeAF's cost. A model is only half of a coding agent; the loop, the tools and the checking decide how much of the model's ability turns into a passing test.

On the head-to-head tasks where CodeAF and mini-swe-agent disagreed, CodeAF solved 29 and mini-swe-agent 23 (head to head).

How much does a coding agent on DeepSeek cost per solved task?

CodeAF on DeepSeek V4 Flash cost $24.73 of model spend for 62 solved DeepSWE tasks, $0.399 per solve and 22 cents a task. Cost per solved task divides total spend by tasks solved, so failed attempts are priced into each success.

HarnessModel spend (113 tasks)SolvedPer solved task
CodeAF (senior-dev)$24.7362$0.399
mini-swe-agent$43.0956$0.769
Codex CLI$42.2351$0.828
Claude Code$21.7216$1.357
OpenCode$56.9630$1.899
DeepSeek Harness$169.4716$10.592

Claude Code spent less in total than CodeAF but solved a quarter as many tasks, which is why it costs more per solve. The full method is on cost per solved issue. CodeAF itself is free under Apache 2.0; you pay only the model provider.

Which DeepSeek model should I use for coding?

DeepSeek's API today offers two models, deepseek-flash (DeepSeek-V4.1-Flash-1017) and deepseek-v4-pro (DeepSeek-V4-Pro-0813), both with a 1M-token context, according to DeepSeek's pricing page. DeepSeek also says the legacy name deepseek-v4-flash is still accepted but is now served by V4.1 Flash and billed at the Flash price.

For a coding agent, Flash is the sensible default. Our benchmark ran V4 Flash, and with the newer V4.1 Flash the same CodeAF senior-dev mode solved 88 of 113 DeepSWE tasks (77.9%). Flash is also the cheaper of the two on DeepSeek's pricing page; try Pro when Flash stalls on a hard task, not as the starting point.

How do I connect CodeAF to DeepSeek?

CodeAF connects to DeepSeek directly with your own DeepSeek key, or through OpenRouter, where every harness in our comparison reached the model.

  1. Install and start CodeAF:

    bash
    curl -fsSL https://agentfield.ai/get/codeaf | bash
    codeaf
  2. In the chat, open /connect and choose DeepSeek. It asks for your key; a key may also be the name of an environment variable, such as $DEEPSEEK_API_KEY. A key with the wrong shape is stopped before any call.

  3. Pick the model with /model; DeepSeek's models appear under their own provider heading. /crew pin worker <model> keeps it in the worker seat for every task (choose the model).

  4. For a large change, type /senior-dev and the brief, the mode that produced the benchmark result. At a shell the same mode is codeaf senior-dev (senior-dev docs).

To reach DeepSeek through OpenRouter instead, codeaf connect openrouter signs in with your browser. Each task is held to $5 unless you change it, and /budget sets a daily limit (budgets).

How do I run Claude Code with DeepSeek?

Claude Code runs on DeepSeek through DeepSeek's Anthropic-format endpoint, with no separate proxy: DeepSeek's integration page sets ANTHROPIC_BASE_URL to https://api.deepseek.com/anthropic and ANTHROPIC_AUTH_TOKEN to your DeepSeek key.

bash
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=<your DeepSeek API key>
export ANTHROPIC_MODEL='deepseek-flash[1m]'
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-flash
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-flash
claude

DeepSeek's page sets more variables than these, including the Opus and Sonnet defaults and an auto-compact window; copy its full list. It also says models starting with claude-opus map to deepseek-v4-pro and claude-haiku or claude-sonnet map to deepseek-flash. In our comparison, Claude Code 2.1.267 on DeepSeek V4 Flash solved 16 of 113 at $1.357 per solve, so it works, but it was built around Claude models. See CodeAF vs Claude Code.

How do I use OpenCode, Codex CLI or mini-swe-agent with DeepSeek?

OpenCode and Codex CLI both appear on DeepSeek's own list of agent integrations, beside DeepSeek Harness and Claude Code, and mini-swe-agent reaches DeepSeek through LiteLLM model names.

  • OpenCode: run /connect, choose a provider and enter its credentials, then /models to pick one. Its catalog comes from models.dev (OpenCode providers).
  • Codex CLI: add a [model_providers.<name>] table with base_url and env_key in config.toml and select it with model_provider (Codex advanced config). DeepSeek's integration list links a Codex guide.
  • mini-swe-agent: "always include the provider in the model name"; its quickstart lists deepseek/deepseek-chat and the DEEPSEEK_API_KEY variable, and -m or --model sets the model (mini-swe-agent models). Check which DeepSeek names LiteLLM maps today, since DeepSeek's pricing page lists only deepseek-flash and deepseek-v4-pro.

How to choose a coding agent for DeepSeek

CodeAF is the choice when DeepSeek is your model and cost per working patch is your measure; the others fit specific habits and setups.

  • Choose CodeAF when you want the most solved tasks per dollar on DeepSeek, several tasks running at once on their own branches, and the option to mix DeepSeek with other open models per seat (/crew models open).
  • Choose mini-swe-agent when you want a small, readable agent loop for research or for building your own harness; it was second in our comparison at 1.9 times CodeAF's cost per solve.
  • Choose Codex CLI when you already use Codex with OpenAI models and want one tool that can also point at DeepSeek through a custom provider.
  • Choose Claude Code when your team already knows Claude Code and switches between Claude and DeepSeek prices with a few environment variables.
  • Choose OpenCode when you want the models.dev catalog and automatic discovery of local runners in the same tool.
  • Choose DeepSeek Harness when you are building on DeepSeek's own agent stack; DeepSeek describes it as a developer preview.

Questions people ask

What is the best coding agent for DeepSeek?

In AgentField's DeepSWE comparison, with ten harnesses all on DeepSeek V4 Flash, CodeAF in senior-dev mode solved the most tasks, 62 of 113 (54.9%), at the lowest cost per solved task, $0.399. mini-swe-agent was second with 56 and Codex CLI third with 51.

Can I run Claude Code with DeepSeek?

Yes. DeepSeek documents it: set ANTHROPIC_BASE_URL to https://api.deepseek.com/anthropic, ANTHROPIC_AUTH_TOKEN to your DeepSeek key, and the model variables to deepseek-flash. In our comparison Claude Code on DeepSeek V4 Flash solved 16 of 113 tasks at $1.357 per solve.

Is DeepSeek good for coding agents?

DeepSeek Flash is a strong, cheap base for an agent when the harness is good. On DeepSeek V4 Flash, CodeAF solved 54.9% of DeepSWE at 22 cents a task, and on V4.1 Flash the same mode solved 77.9%. The same model inside other harnesses solved between 2.7% and 49.6%.

Should I use DeepSeek Flash or Pro for coding?

Start with Flash. DeepSeek's pricing page lists deepseek-flash as the cheaper model, and our results on Flash are the ones we can source. Move a hard task to deepseek-v4-pro when Flash fails it.

Does CodeAF need OpenRouter to use DeepSeek?

No. CodeAF connects DeepSeek directly with your own key from /connect, and a direct provider carries the conversation without an OpenRouter key. OpenRouter is one option, and it is how every harness reached the model in our comparison.

Sources

Last updated 2026-11-21.