Skip to content
AI engineering16 Aug 20267 min read 2 views

GLM-5.2 vs Kimi K3 (2026): Which Cheap Model Is Actually Better for Coding?

GLM-5.2 is 3.4x cheaper per output token. Kimi K3 scores 42 to 13 on long-horizon agent work. Here is the full comparison and which one belongs on which job.

Garvish Dua

Founder, Kraftzen

Share
GLM-5.2 vs Kimi K3

Two Chinese labs shipped open-weight models a month apart in 2026, both aimed squarely at the coding agent market, both priced well under the American frontier.

If you are picking one to run your agent on, the benchmark posts will not help much. They compare scores that were produced on different harnesses, which moves results by double digits before the models are even involved.

So this compares the things that decide it in practice: what a real coding session costs on each, where each one measurably wins, and which one to put on which job.

The short answer

GLM-5.2 for volume, Kimi K3 for the hard ones. GLM costs roughly a third of K3 per output token and holds its own on standard coding benchmarks. K3 pulls ahead sharply on long-horizon agent work, where a task runs for many turns without a human correcting it.

If you only take one thing: the gap between them is not "which is smarter". It is how far each one gets before it loses the plot.

What each model actually is

GLM-5.2 shipped from Z.ai on 16 June 2026. Around 753 billion parameters in a Mixture of Experts design activating roughly 39 billion per token, released under an MIT licence, with a one million token context available through the glm-5.2[1m] identifier. It introduced an attention change called IndexShare that reuses one lightweight indexer across every four sparse-attention layers, cutting per-token compute 2.9x at long context (Interconnects).

Kimi K3 shipped from Moonshot on 16 July 2026. 2.8 trillion parameters, MoE, 16 of 896 experts active per token, native vision, one million token context (Fortune).

The size difference is the story. K3 is roughly four times the parameter count and it costs roughly three times as much to run. Whether that buys you anything depends entirely on what you point it at.

The comparison

GLM-5.2Kimi K3Which wins
Released16 June 202616 July 2026Tie
Size~753B MoE, ~39B active2.8T MoE, 16 of 896 expertsK3 on raw capacity
Context1M via glm-5.2[1m]1M nativeTie
LicenceMITOpen weightsGLM, MIT is as permissive as it gets
API input$1.40 / 1M$3.00 / 1MGLM, 2.1x cheaper
API output$4.40 / 1M$15.00 / 1MGLM, 3.4x cheaper
Cached input$0.26 / 1M$0.30 / 1MRoughly tie
SWE-bench VerifiedNot directly comparable76.8%K3, on the score it published
Terminal-Bench 2.181.0 (vendor)80.9 (Vals)Tie, but different harnesses
SWE Marathon13.042.0K3, by a wide margin
Intelligence Index5157K3
SubscriptionGLM Coding Plan from $18/moPay per tokenGLM, if you code daily
Best atHigh-volume edits, cost controlLong autonomous runsDepends on the job

Sources: OpenRouter, Z.ai pricing, MarkTechPost.

Chart showing GLM-5.2 much cheaper per output token while Kimi K3 scores far higher on long-horizon agent work
Chart showing GLM-5.2 much cheaper per output token while Kimi K3 scores far higher on long-horizon agent work

Why the benchmark numbers deserve suspicion

Read the harness before you read the score.

K3's Terminal-Bench 2.1 result was produced using Moonshot's own Kimi Code harness. GLM-5.2's was produced with Claude Code. The harness around a model changes how it plans, retries and uses tools, and it can move a result by double digits on its own. Two numbers one tenth of a point apart, from two different harnesses, tell you almost nothing.

The number that does survive this is SWE Marathon: 42.0 for K3 against 13.0 for GLM-5.2. A gap that size is not harness noise. It is a real difference in how long a model can run without going off the rails, and it lines up with what the size difference would predict.

A benchmark gap of one tenth of a point across two harnesses is noise. A gap of 42 to 13 is a finding.

What each one actually costs you in a day of work

Take a normal agent session: a large repository as context, twenty turns, and a few hundred lines of generated code per turn.

The input side barely differs, because caching does the heavy lifting for both and they land within a rounding error of each other at $0.26 and $0.30 per million.

The output side is where the bill is decided, and there GLM is 3.4 times cheaper. Coding agents are output-heavy. They write code, rewrite it, explain it, then write the tests. If you are running agents at any volume, that ratio is the number that ends up on your invoice.

There is one wrinkle worth knowing about the subscription route. The GLM Coding Plan starts at $18 a month, but GLM-5.2 consumes quota at a multiplier: 3x during peak hours of 14:00 to 18:00 UTC+8, and 2x otherwise, with a promotion through September 2026 dropping off-peak to 1x. A plan that looks like it covers your usage may not, and the reason is a multiplier in the fine print rather than the headline prompt count.

Which should you use?

Use GLM-5.2 if you are running high volume, if cost per task is the constraint, if you want an MIT licence for anything you build on top, or if your work is well-scoped edits where a human reviews each change anyway. It is also the better default for a team, because predictable cost beats occasional brilliance when several people are running agents at once.

Use Kimi K3 if you are handing an agent a task and walking away. Migrations, multi-file refactors, anything that runs for an hour unattended. The SWE Marathon gap says it stays coherent about three times as far into a long task, and when that matters it more than pays for the 3.4x on output.

Use both if you can be bothered to route. Cheap model for the loop, expensive model for the hard step. This is more work than most teams want, but it is what the cost curve actually rewards.

Use neither if your work is mostly small and the review overhead is the real cost. At that point the model is not your bottleneck and you would be optimising the wrong thing.

Common mistakes

Comparing benchmark scores across harnesses. Covered above and worth repeating because nearly every comparison post does it. Check what harness produced a number before you weigh it.

Pricing a project on cache-miss input. Both models discount cached input by around 90%. A coding agent re-sends the same repository constantly, so quoting yourself at the miss rate overestimates the input side by roughly ten times.

Reading the GLM Coding Plan headline and ignoring the multiplier. Peak-hour usage burns quota at 3x. The prompt counts in the tier table are not what you get if you work in the afternoon in UTC+8.

Assuming open weights means you can self-host. GLM-5.2 at 753B is a serious deployment. K3 at 2.8T is a datacentre. For nearly everyone, open weights means portability between hosted providers, not independence from them. That portability is still worth something, particularly with GLM's MIT licence.

Treating "cheap" as one category. These two are both cheap relative to the American frontier and 3.4x apart from each other on output. That is a bigger relative gap than the one between many models people agonise over.

Key takeaways

  • GLM-5.2 costs $1.40 input and $4.40 output per million. Kimi K3 costs $3.00 and $15.00. On output, GLM is 3.4x cheaper.
  • Kimi K3 scores 76.8% on SWE-bench Verified and 42.0 on SWE Marathon, against 13.0 for GLM-5.2 on the latter.
  • The SWE Marathon gap is the one benchmark difference too large to be harness noise, and it maps to how long an agent runs unattended.
  • Terminal-Bench has them a tenth of a point apart on different harnesses, which means it settles nothing.
  • GLM-5.2 is MIT licensed, which is more permissive than most open-weight releases and matters if you build products on top.
  • The GLM Coding Plan starts at $18 a month but burns quota at 2x to 3x depending on the hour, so read the multiplier before sizing a tier.
  • Pick GLM for volume and predictable cost, K3 for long unattended runs, and route between them if you have the appetite.

If you want K3 running in your terminal rather than in a browser, the OpenCode setup is six steps and covers the account gotcha that breaks it. And if you are weighing which agent framework to wrap around either model, we compared the Claude Agent SDK, LangGraph and OpenAI Agents SDK on what holds up in production. Choosing and wiring these models into real systems is what we do.

  • glm
  • kimi
  • ai coding
  • llm

Questions

Frequently asked