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. Moonshot’s new Kimi K3.1 Pro, an exciting new release from a major player, gave us a reason to check whether the rankings had changed again, so we ran it on the same long coding sessions we use for every model, next to GLM 5.3, the previous Kimi K3 and DeepSeek V4.1 Flash 1017.
Short answer: DeepSeek V4.1 Flash 1017 is the best open-weight model for coding in our tests, and it isn’t close. It scored 80% overall at $0.14 per long session. GLM 5.3 scored 74%, and Kimi K3 and the new Kimi K3.1 Pro both scored 72%, at $2.46 to $4.28 a session.
These are our own runs on real coding work, not numbers the vendor reported.
Which open-weight model is best for coding?
DeepSeek V4.1 Flash 1017. It leads on overall score, long sessions and short questions, and it’s also the cheapest by a wide margin.
| Model | Overall score | Long agentic sessions | Cost per long session | Time per long session | Short sessions | Cost per question |
|---|---|---|---|---|---|---|
| Open weightsDeepSeek V4.1 Flash 1017 | 80% | 77% | $0.14 | 15.4 min | 90% | $0.013 |
| Open weightsGLM 5.3 | 74% | 71% | $2.86 | 20.5 min | 83% | $0.15 |
| Open weightsKimi K3 | 72% | 70% | $2.46 | 16.8 min | 80% | $0.31 |
| NewKimi K3.1 Pro | 72% | 71% | $4.28 | 28.2 min | 74% | $0.13 |
Scores are percentages of the maximum. The overall score weights long agentic sessions at 75% and short sessions at 25%, because long work is where teams spend most of their time and money. A long session is a multi-turn job on a real service: trace the code, work out why something fails, plan a fix, implement it, then audit the change. Short sessions are one-shot asks, like explaining how a setting gets resolved or fixing a small bug.
For reference, Claude Opus 5.5 scores 87% overall on the same tasks at $5.42 a long session, and Claude Sonnet 5.5 scores 75% at $1.28. So the best open-weight model is 7 points behind Opus and 5 points ahead of Sonnet, for a small fraction of either one’s price.
Kimi vs GLM vs DeepSeek: where does the gap open?
It opens as soon as the model has to reason about what it found. All four find the code fine. On the first turn, tracing where something lives, everyone scored between 88% and 92%.
| Turn in a long session | Score by model |
|---|---|
| Trace the code |
92%89%90%88%
|
| Analyze the failure |
75%68%62%70%
|
| Plan the fix |
81%68%68%72%
|
| Implement |
68%70%69%67%
|
| Audit |
70%59%59%56%
|
DeepSeek V4.1 Flash 1017GLM 5.3Kimi K3Kimi K3.1 Pro
DeepSeek is 5 to 13 points ahead on analysis and planning. On the audit, where the model checks its own change against what it was asked to do, it’s 11 to 14 points ahead. Implementation is a tie, with all four between 67% and 70%.
That audit gap matters more than it looks. A model that writes a decent fix and then can’t spot what’s wrong with it hands the checking back to you.
Is GLM 5.3 good for coding?
Yes, and it’s the best of the rest. If you can’t use DeepSeek, GLM 5.3 is the one we’d pick. It matched both Kimis on long sessions (71% against 70% and 71%) and beat them on short questions with 83%, against 80% for Kimi K3 and 74% for Kimi K3.1 Pro.
It costs $2.86 per long session, close to Kimi K3 and about two-thirds of Kimi K3.1 Pro. At z.ai’s list price of $1.40 per million input tokens and $4.40 per million output tokens, it’s also the cheapest per token of the three.
Is Kimi K3.1 Pro better than Kimi K3?
Not on this work. Both scored 72% overall, and the 1-point edge K3.1 Pro has on long sessions is inside our noise. K3.1 Pro thinks a lot more: about 98,000 output tokens per long session against 44,000 for K3. That bought it real gains in diagnosis (70% against 62%) and planning (72% against 68%), which then disappeared at implementation and the audit.
It also got one short security question backwards in all four sessions, saying an unset admin token disables a bypass when the shipped default is a value any client can send. We cover the two Kimis in more detail in Kimi K3.1 Pro vs Kimi K3 for coding.
How much do these open-weight models cost per session?
DeepSeek is about a twentieth of the price of GLM 5.3 or Kimi K3, and about a thirtieth of Kimi K3.1 Pro.
Kimi K3.1 Pro’s list price is $2 per million input tokens and $10 per million output, the same as Claude Sonnet 5.5. It still costs more than three times as much as Sonnet per long session, because it writes so much reasoning. At $4.28 it’s about 80% of what Opus costs, for 15 fewer points overall.
Costs are at each provider’s standard list price.
How fast are they in a coding agent?
DeepSeek was the fastest at 15.4 minutes per long session, then Kimi K3 at 16.8 and GLM 5.3 at 20.5. Kimi K3.1 Pro took 28.2 minutes, mostly because of the extra thinking and more than twice as many requests as K3.
A note on Kimi K3.1 Pro: Moonshot calls it an open-weight model, but the weights weren’t public at launch. Moonshot has said they’ll follow shortly. We tested it through Moonshot’s API.
How we tested
The benchmark is a set of agentic coding tasks taken from real work on our own services. We run every model inside Claude Code with default settings and no extra prompting, with the version pinned. We’ve found models score about the same in Claude Code, Codex and Cursor, so the tool isn’t what we’re measuring.
Every model gets the same fixed prompts, and every turn is graded against an answer key checked against the code, by a judge scoring five dimensions. The judge is Claude Opus 5.5, and the answer keys tie it to facts rather than taste. We ran 8 long sessions and 16 short ones per model. DeepSeek V4.1 Flash 1017 and the Claude numbers come from our earlier runs on the same tasks and answer keys. Session-to-session noise is about 3 points, so read 1 to 2 point gaps as ties.
FAQ
What is the best open-weight model for coding?
In our agentic coding benchmark it’s DeepSeek V4.1 Flash 1017, at 80% overall and $0.14 per long session. GLM 5.3 is second at 74%.
Is Kimi K3.1 Pro better than GLM 5.3?
No. Kimi K3.1 Pro scored 72% overall and GLM 5.3 74%. They tied on long sessions (71% each), and GLM 5.3 was 9 points better on short questions at about two-thirds of the cost per session.
Kimi vs DeepSeek for coding: which is better?
DeepSeek V4.1 Flash 1017. It scored 80% overall against 72% for both Kimi K3.1 Pro and Kimi K3, and costs $0.14 a long session against $2.46 to $4.28.
How close are open-weight models to Claude for coding?
The best one, DeepSeek V4.1 Flash 1017, scored 80% overall, 7 points behind Claude Opus 5.5 (87%) and 5 points ahead of Claude Sonnet 5.5 (75%).
Which open-weight model is best for agentic coding?
DeepSeek V4.1 Flash 1017 scored 77% on our long agentic sessions, level with Claude Sonnet 5.5. GLM 5.3 and Kimi K3.1 Pro each scored 71%.