Picking an open-weight model for coding comes down to three numbers: how well it does the job, what a session costs, and how long it takes. Teams that want a cheaper coding agent, or one they can host themselves, look here first, so we ran the main open-weight models through the same long agentic coding sessions we use for Claude and compared all three numbers.
Short answer: DeepSeek V4.1 Flash 1017 is still the best open-weight model for coding in our tests. It scored 73.2% overall, about 7 points ahead of MiniMax M3.1 Flash (66.7%) and GLM 5.3 (66.2%). A 20-turn session costs $3.28 on DeepSeek and $34.82 on GLM. Kimi K3.1 Pro is fourth at 59.3%, and over 20 turns it was the most expensive model we tested: $149.86 a session, more than three times Claude Opus 5.5.
These are our own runs on real coding work, not numbers the vendor reported.
Which open-weight model is best for coding?
| Model | Overall score | Hard 5-turn sessions | 20-turn session | One-shot questions | Cost vs Opus 5.5 | Time vs Opus 5.5 |
|---|---|---|---|---|---|---|
| Open weightsDeepSeek V4.1 Flash 1017 | 73.2% | 64.9% | 76.4% | 80.7% | 92% less | 12% faster |
| Open weightsMiniMax M3.1 Flash | 66.7% | 59.4% | 66.4% | 78.3% | 89% less | 17% slower |
| Open weightsGLM 5.3 | 66.2% | 51.2% | 74.0% | 76.9% | 23% less | 1% faster |
| Open weightsKimi K3.1 Pro | 59.3% | 60.3% | 54.8% | 64.4% | 222% more | 2.2x as long |
| Open weightsInkling 2 Small | not run | 58.8% | not run | 76.1% | not run | not run |
All models at their default settings. Time compares the long sessions. Best value in each column in bold.
The overall score weights long sessions at 75% (hard 5-turn sessions and a 20-turn session, equally) and one-shot questions at 25%. Inkling 2 Small has no overall score because it hasn’t run the 20-turn session yet.
For reference, Claude Opus 5.5 scores 86.9% overall, Claude Sonnet 5.5 72.3% and Claude Haiku 5.5 70.9%. So the best open-weight model is 14 points behind Opus, level with Sonnet and 2 points ahead of Haiku, for a small fraction of the price.
Where does the gap open?
It depends on the kind of work, and the order changes a lot between columns. On hard 5-turn sessions (trace the code, analyze a failure, plan a fix, implement it, audit it) DeepSeek leads at 64.9%, then Kimi K3.1 Pro at 60.3%, MiniMax at 59.4% and Inkling at 58.8%. GLM 5.3 is last at 51.2%.
Over the 20-turn session GLM jumps to second, at 74.0% against DeepSeek’s 76.4%. MiniMax falls to 66.4% and Kimi K3.1 Pro to 54.8%. On one-shot questions DeepSeek leads at 80.7%, then MiniMax (78.3%), GLM (76.9%) and Inkling (76.1%), with Kimi last at 64.4%.
DeepSeek is the only one that’s first in every score column.
Is GLM 5.3 good for coding?
Over a long session, yes. GLM 5.3 scored 74.0% on the 20-turn session, second only to DeepSeek and close to Claude Haiku 5.5’s 76.0%. On the hard 5-turn sessions it’s the weakest here at 51.2%, and on one-shot questions it’s in the middle at 76.9%.
It’s expensive over long sessions, though. A 20-turn session cost $34.82, about 80% of what Opus spent, because GLM carries and rereads the whole session on every request. DeepSeek did the same work for $3.28.
MiniMax M3.1 Flash vs GLM 5.3
They tie overall, 66.7% against 66.2%, with opposite strengths. MiniMax is 8 points better on the hard 5-turn sessions (59.4% against 51.2%) and GLM is 8 points better over 20 turns (74.0% against 66.4%). MiniMax is much cheaper on long work: $4.56 for a 20-turn session against $34.82. It’s also slower, at 134 minutes over 20 turns against GLM’s 101.
Is Kimi K3.1 Pro worth it?
Not for long agentic work. A 20-turn session on Kimi K3.1 Pro cost $149.86 and took 320 minutes. Claude Opus 5.5 did the same session for $43.37 in 112 minutes and scored 89.4% to Kimi’s 54.8%. Kimi keeps the whole session, half a million to a million tokens, and sends it again on every request: its two 20-turn sessions made 823 and 982 requests. Its price per token is the same as Claude Sonnet 5.5, and even at the cheaper cached-token rate that volume adds up.
On hard 5-turn sessions it scored 60.3%, second among the open models, at $7.71 a session, more than Opus’s $5.40. It scored lowest here on one-shot questions, at 64.4%.
How much do these open-weight models cost per session?
Price per token doesn’t predict these well. What matters is how much of the session each model sends again on every request and how much of that the provider’s cache covers. A 20-turn session cost $3.28 on DeepSeek, $4.56 on MiniMax, $34.82 on GLM 5.3 and $149.86 on Kimi K3.1 Pro, against $43.37 on Claude Opus 5.5.
How fast are they in a coding agent?
On a hard 5-turn session DeepSeek was fastest at 18.9 minutes, then GLM 5.3 at 20.5, MiniMax at 21.7, Inkling at 23.6 and Kimi K3.1 Pro at 28.1. Opus 5.5 takes 19.0. Over 20 turns DeepSeek took 85 minutes, GLM 101, MiniMax 134 and Kimi 320, against 112 for Opus.
How we tested
We ran each open-weight model through Fireworks with default settings in a coding agent and gave each one its full context window. Our first runs used a smaller window than these models have, which made long sessions stop to summarize the conversation. Fixing that changed some results a lot: DeepSeek’s 20-turn session went from 263 minutes to 85, and GLM gained 16 points on it. Kimi K3.1 Pro went the other way: it lost 14 points on the 20-turn session and cost about five times as much, because it kept working in a context of half a million to a million tokens. We’ve found models score about the same across the major coding agents.
The hard 5-turn sessions are two build tasks on production services: trace the code, analyze a failure, plan a fix, implement it and audit it. The 20-turn session is one task across two services, from investigation through implementation and review. One-shot questions are explanation, lookup and small-fix asks. An independent judge scores each answer against fixed answer keys and takes 4 points off for every claim that would mislead an engineer. The overall score weights long sessions 75% and one-shot questions 25%. Cost uses the same weights, and time compares minutes on the long sessions. Session-to-session noise is about 3 points, so treat gaps of 1 or 2 points as ties.
FAQ
What is the best open-weight model for coding?
DeepSeek V4.1 Flash 1017 in our agentic coding benchmark, at 73.2% overall and $3.28 per 20-turn session. MiniMax M3.1 Flash (66.7%) and GLM 5.3 (66.2%) are next, then Kimi K3.1 Pro (59.3%).
Is Kimi K3.1 Pro better than GLM 5.3?
On hard 5-turn sessions, yes: 60.3% against 51.2%. GLM is 12 points better on one-shot questions (76.9% against 64.4%) and costs about a third as much per hard session ($2.87 against $7.71). Over 20 turns GLM scored 74.0% to Kimi’s 54.8% and cost $34.82 against $149.86. Overall, GLM scored 66.2% and Kimi 59.3%.
Kimi vs DeepSeek for coding: which is better?
DeepSeek. It scored 64.9% against 60.3% on hard 5-turn sessions and 80.7% against 64.4% on one-shot questions, and it costs $0.44 a hard session against $7.71.
How close are open-weight models to Claude?
The best one, DeepSeek V4.1 Flash 1017, scored 73.2% overall, 14 points behind Claude Opus 5.5 (86.9%), level with Claude Sonnet 5.5 (72.3%) and ahead of Haiku 5.5 (70.9%).
Why is Kimi K3.1 Pro so expensive per session?
It keeps the whole session in its context, up to a million tokens, and reads it again on every request. Its 20-turn sessions made 823 and 982 requests, and a session averaged $149.86.