Answers

Which model should I use for a coding agent?

Start with the cheapest model that passes your evals, and escalate individual tasks rather than the whole workload. Coding agents spend most of their tokens on reading files, tool results and retries — work where a frontier model buys you very little — so the model choice that matters is per step, not per project.

What agent loops actually spend

A coding agent’s token bill is dominated by input: the system prompt, the files it opened, the output of every tool call, and the whole conversation resent on each turn. The generated code is a small fraction. That is why a model’s input price and its ability to follow a tool protocol matter more than its score on a reasoning benchmark.

A workable split

  • Bulk steps — reading, searching, summarising, routine edits: the cheapest model that holds the tool protocol. On our catalogue that is DeepSeek-V4-Flash, which does tool calls and costs about a third of MiniMax-M2.7.
  • Hard steps — a design decision, a stubborn bug, an unfamiliar codebase: a stronger model, invoked deliberately. MiniMax-M2.7, Kimi K2.6 or GLM-5.2 here.
  • Anything unattended: whatever you have measured, on an account with failover. An overnight run that dies at 3am on a saturated free network costs more than the model ever did.

Published scores, with the caveat

ModelSWE-bench ProSource
GLM-5.262.1Z.ai model card
Kimi K2.658.6Moonshot model card
MiniMax M2.756.2MiniMax model card

Those three numbers come from three vendors running their own harnesses. They are three claims, not one comparison — useful for ruling models out, not for ranking them. Your own repository is the only benchmark that decides this.

How to actually decide

  1. 1.Take ten tasks you have already done, where you know what good looks like.
  2. 2.Run them on the cheap model. Count how many need a second attempt.
  3. 3.Run the failures on the expensive one. If it does not fix them either, the problem is the prompt or the harness, not the model.
  4. 4.Price the mix, not the model. A cheap model that retries once is still usually cheaper than a frontier model that does not.

FAQ

Is an open-weight model good enough for real coding work?

On published coding benchmarks the gap to frontier models is small — Kimi K2.6 reports 80.2 on SWE-Bench Verified against 80.8 for Claude Opus 4.6, under the harness Moonshot publishes. The gap that remains is on hard reasoning. For agent loops, which are mostly mechanical, the trade is usually worth it.

Can I switch models per request?

Yes — the model id is a per-request field, so an agent can escalate mid-run. Most tools expose this as a "model for this task" setting.

Which model works in Cursor / Cline / Aider?

All of them: those tools take an OpenAI-compatible base URL and pass the model id straight through. The setup guides have the exact fields for each.

Get a free key Prices and figures verified August 14, 2026.