The best open-source models for coding agents in 2026
For coding agents, the strongest open-source models in 2026 are DeepSeek V4 Pro, GLM-5.3 and Kimi K3: they solve 96.4%, 95.4% and 93.4% of real GitHub issues on SWE-bench Verified, against Claude Opus 5 at 97.0% for the best closed model. DeepSeek V4 Pro is also the cheapest of the three, at $0.13 per task, 93% less than Claude Opus 5.5. DeepSeek V4.1 Flash is the cheapest option for high-volume steps.
How do the open models compare?
The coding score is the share of real GitHub issues a model fixes on SWE-bench Verified, which Vals AI runs with the same agent for every model, so the scores compare directly. The best closed model, Claude Opus 5, solves 97.0%.
| Model | Coding score | Per task |
|---|---|---|
| DeepSeek V4 Pro | 96.4% | $0.13 |
| GLM-5.3 | 95.4% | $0.92 |
| Kimi K3 | 93.4% | $1.74 |
| Qwen3.8-Max | 85.6% | $1.09 |
| MiniMax M3 | 75.0% | $0.65 |
| DeepSeek V4.1 Flash | – | $0.12 |
Per task is a coding-agent loop with 2M input tokens, 1.8M of them from the cache, and 40K output tokens. For comparison, the same task costs $1.96 on Claude Opus 5.5.
Kimi K3: a whole repository in context
Moonshot AI's Kimi K3 is a mixture-of-experts model with 2.8T total parameters, 104B active per token, and a 1M-token context. It solves 93.4% of SWE-bench Verified and holds a whole repository in context on long, sustained coding loops. Its cached-input price is higher than Opus 5.5's, so on cache-heavy agents it saves about 11%. Kimi K3 vs Claude Opus 5.5.
GLM-5.3: near the top at half the price
Z.ai's GLM-5.3 solves 95.4% of SWE-bench Verified, second among the open models, and costs about half as much per task as Opus 5.5. It is a strong first choice for agents that live in a shell. GLM-5.3 vs Claude Opus 5.5.
DeepSeek V4 Pro: the top open model, at a fraction of the cost
DeepSeek V4 Pro solves 96.4% of SWE-bench Verified, the highest of the open models and close to Claude Opus 5 at 97.0%. It has a 1M-token context and charges $0.003625 per million cached tokens, so on agents that reread long context every turn it is 93% cheaper than Opus 5.5. DeepSeek V4 Pro vs Claude Opus 5.5.
DeepSeek V4.1 Flash: for high-volume steps
The cheapest model in this list. It hasn't been run on SWE-bench Verified yet, so use it for routine agent steps such as searches, file reads and small edits, and route harder tasks to a larger model. DeepSeek V4.1 Flash vs Claude Opus 5.5.
Qwen3.8-Max and MiniMax M3
Qwen3.8-Max is a large general model with strong tool use, released with open weights as a 2.4T-parameter checkpoint. MiniMax M3 activates 23B of its 428B parameters per token, which makes it quick and cheap on tool calls and browser or desktop work, though it trails the others on coding at 75.0%. Qwen3.8-Max vs Claude Opus 5.5 · MiniMax M3 vs Claude Opus 5.5.
How to choose for your agent
- Shortlist two or three models from the table for your workload.
- Collect 20 to 30 real tasks with a clear success signal, such as tests that pass.
- Run each model in the same agent harness and record spend and outcome per task.
- Pick the lowest cost per successful task, not the lowest token price.
Run the comparison on full-precision weights. Heavily quantised versions often fail exactly where coding agents need precision: edit formats and long chains of tool calls.
Common questions
What is the best open-source model for coding agents?
DeepSeek V4 Pro, GLM-5.3 and Kimi K3 lead the open models on coding: they solve 96.4%, 95.4% and 93.4% of real GitHub issues on SWE-bench Verified, against Claude Opus 5 at 97.0% for the best closed model. DeepSeek V4 Pro is also the cheapest of the three.
Which open-source coding model is cheapest?
DeepSeek V4.1 Flash, at $0.12 per typical coding-agent task, followed by DeepSeek V4 Pro at $0.13. Claude Opus 5.5 costs $1.96 for the same task.
Can open-source models replace Claude for coding?
For many coding agents, yes, at a large saving. The best open model solves 96.4% of real GitHub issues on SWE-bench Verified, against Claude Opus 5 at 97.0% for the best closed model. Test on your own tasks and compare cost per successful task before switching everything.
More guides
- Open-source LLM inference for AI agents: the complete guide
- How to fine-tune an open-source LLM for your AI agent
- Self-hosted LLMs vs an inference API vs on-prem: how to choose
- Prompt caching and the KV cache: why cached tokens decide an agent's bill
- How to run Claude Code on open-source models
- Cost per successful task, explained