If you only need the verdict: GLM 5.2 is the stronger default for pure coding — it leads on independent intelligence scores, wins most front-end and complex-app builds, and carries a 1M-token context for repo-scale work. Kimi K2.7 Code is the better pick when you need cheaper input tokens, native image/video input, or a tool-heavy agent loop where its lower per-call cost adds up. When I ran the same coding tasks through both, they were equally correct — but on clean algorithmic problems Kimi reached the answer with a fraction of the tokens. Published specs shift with how each model is configured, so the tables below combine official Z.ai and Moonshot figures, independent benchmarks, and my own runs. (Kimi K2.7 Code is sometimes searched as "Kimi 2.7 Code" — it's the same model.)
The specs that actually differ
Both models shipped within four days of each other in June 2026, both are open-weight Mixture-of-Experts (MoE) systems from Chinese labs, and both target agentic coding. The table below draws pricing, speed, and intelligence figures from Artificial Analysis's independent index (checked 13 July 2026), context and license from Z.ai's and Moonshot AI's own docs, and the discounted rate from OpenRouter's live model pages.
Metric | Kimi K2.7 Code (Moonshot) | GLM 5.2 (Z.ai) |
|---|---|---|
Intelligence Index (Artificial Analysis) | 42 | 51 (max / high-effort config) |
Input price / 1M tokens | $0.95 | $1.40 (as low as $0.42 on OpenRouter) |
Output price / 1M tokens | $4.00 | $4.40 (as low as $1.32 on OpenRouter) |
Output speed | ~50 tok/s | 59–205 tok/s (provider-dependent) |
Time to first token | 3.06s | 1.43s |
Context window | 256K | 1M (max output 128K) |
Parameters (MoE) | 1T total / 32B active | 753B total / 40B active |
Input modalities | Text, image, video | Text only |
License | Open weights (Moonshot model license) | MIT (fully open weights) |
Released | June 12, 2026 | June 16, 2026 |
Two differences do most of the work in practice. GLM 5.2 has a four-times-larger context window (1M vs 256K), which matters the moment you feed it a whole repository. Kimi K2.7 Code is natively multimodal on input — you can hand it a screenshot of a broken UI or a design mock, which GLM 5.2, being text-only, cannot accept without a separate OCR step.
Hands-on: I ran the same tasks through both
Benchmarks are one thing; watching both models solve the same problem is another. On 13 July 2026 I sent each model (temperature 0, identical prompts) three self-contained coding tasks and graded the output against edge-case test suites: a LeetCode-style string-to-integer parser with 32-bit overflow clamping (17 assertions), the median of two sorted arrays (8 assertions), and a bug-fix on a broken binary search (10 assertions).

Task | Kimi K2.7 Code | GLM 5.2 |
|---|---|---|
String-to-integer (17 cases) | 16/16 correct · 325 output tokens · 8.6s | 16/16 correct · 3,955 tokens · 69.6s |
Median of two arrays (8 cases) | 8/8 · 608 tokens · 17.7s | 8/8 · 3,854 tokens · 64.8s |
Binary-search bug fix (10 cases) | 10/10 · 250 tokens · 7.1s | 10/10 · 1,108 tokens · 17.4s |
Total | 34/34 · 1,183 tokens · 33s | 34/34 · 8,917 tokens · 152s |
The headline: both were perfectly correct on every case, but GLM 5.2 spent roughly 7.5× the output tokens and 4.5× the wall-clock time to get there. GLM runs a heavy thinking pass by default, and on problems that don't need it, that reasoning is pure overhead. At list output rates this suite cost about $0.005 on Kimi versus $0.039 on GLM.
This is a small, single-run sample on algorithmic tasks — not a benchmark — and it doesn't cover front-end or long-agent work. But the pattern is consistent enough to act on: for well-specified problems, Kimi K2.7 Code gets you the same answer far cheaper and faster, while GLM's extra deliberation earns its cost on harder, more open-ended work (see the cost section below).
How GLM 5.2's settings change its numbers
GLM 5.2's headline figures move with how you run it, so two spec sheets can quote different numbers for the same model. Three settings to pin down before comparing:
Effort tier. GLM 5.2 exposes several reasoning-effort levels. At its high-effort "max" setting it scores 51 on Artificial Analysis's intelligence index; a lower-effort setting lands closer to 40. That setting also drives token cost — it's what ran GLM to ~7.5× Kimi's tokens in the test above. Use high effort for hard problems; dial it down for simple ones.
Context notation. Kimi's window is 256K, occasionally written 262K. It's the same limit — 262,144 tokens exactly, just rounded differently.
Serving provider. GLM 5.2's throughput runs from roughly 59 to 205 tokens per second depending on the host; Kimi sits around 50 tok/s on its standard tier, with faster high-speed tiers. A speed number only means something with a provider attached.
Coding head-to-head: what task-level results show
The task-by-task picture is more useful than an aggregate score. In composio's July 2026 head-to-head, which ran both models through the same coding and tool-use suites, they trade blows by task type rather than one dominating.
On Terminal-Bench hard tasks, they finished level in composio's run — five solves each — but on different problems. GLM 5.2 cleared vulnerability fixing and file compression; Kimi K2.7 Code handled regex-heavy logic and tensor-parallelism work. Neither dominated; they have different blind spots.
On 22 real-world SaaS automation tasks in the same run, GLM edged ahead at 0.800 versus Kimi's 0.775 — a real but narrow margin. The gap widened on structured workflows like retrieving the last commit on a GitHub repo, where GLM scored a perfect 1.00 against Kimi's 0.45.
Front-end is GLM's clearest win. This is where community reports line up: across Reddit threads in r/ZaiGLM and r/opencodeCLI, developers repeatedly call GLM 5.2 the stronger choice for building and styling UI from a prompt ("for front end, glm 5.2 blows every model out of the water," in one r/opencodeCLI post). If your day is React components and landing pages, that's the tiebreaker.
Agentic and tool-use loops tilt to Kimi. On composio's tool-calling suite, Kimi finished the work for $1.78 in total spend versus GLM's $2.55, and the run noted Kimi extending features slightly beyond the literal request. For long autonomous loops where you're paying per tool call, that lower cost adds up.
Cost: cheaper per token vs cheaper per task
This is where a quick glance at the price sheet misleads. Kimi K2.7 Code has the lower sticker price — $0.95 per million input tokens against GLM's $1.40 (GLM drops to $0.42 on the cheapest OpenRouter route). If you stopped there, Kimi looks like the budget choice.
But per-token price isn't your bill; tokens-consumed-per-task is — and that number moves in both directions depending on the work. On my clean algorithmic tasks, GLM's default thinking pass ballooned its token count, making Kimi roughly 8× cheaper for identical answers. But composio's harder SaaS-automation run found the opposite: GLM 5.2 was cheaper per solved problem — about $0.99 per solve versus Kimi's $1.17 — because on open-ended tasks its extra deliberation reached working answers with fewer expensive retries. Reddit testers describe the same tension: Kimi's rate is low, but it "uses more tokens" on some jobs.
The practical rule: estimate cost on your actual workload, not the headline rate. Run both on a representative task for a day — same provider, effort tier, and tool budget — and compare the total invoice. It's the only number that reflects your real spend, and as the two runs above show, the winner flips with task complexity.
Which one should you pick
Front-end and complex app generation → GLM 5.2. The most consistent quality edge, and the favorite in the r/ZaiGLM and r/opencodeCLI threads for UI work.
Repo-scale or long-context work → GLM 5.2. The 1M-token window handles whole codebases that overflow Kimi's 256K.
Well-specified, high-volume tasks → Kimi K2.7 Code. In my run it hit the same correct answers with ~7.5× fewer tokens — a real cost and latency win when the problem is clear.
Screenshot- or design-driven coding → Kimi K2.7 Code. Native image and video input is a hard requirement GLM can't meet on its own.
Budget-sensitive, tool-heavy agents → Kimi K2.7 Code. Lower observed tool-loop spend compounds across long autonomous loops.
Self-hosting with license certainty → GLM 5.2. Its MIT license and smaller 753B footprint make on-prem more approachable; Kimi's trillion-parameter scale is far harder to run yourself.
How to access each model
Both are open-weight, so you have three routes. The official APIs — Z.ai for GLM 5.2 and Moonshot AI for Kimi K2.7 Code — give you the canonical endpoints and latest weights. Aggregators like OpenRouter expose both behind one key and often the cheapest live GLM rate (around $0.42 / $1.32 per million tokens), which also makes A/B testing them trivial; our OpenRouter models guide for programming covers routing tradeoffs. Self-hosting is more approachable for GLM 5.2 — its MIT license and 753B parameters make community quantized builds practical, though the hardware bar is still high; Kimi's 1T-parameter footprint puts local deployment out of reach for most single-GPU setups.
For teams already benchmarking GLM against closed models, our GLM 5.2 API guide breaks down provider pricing in more detail.
FAQ
Is GLM 5.2 better than Kimi K2.7 Code for coding?
For front-end, complex app generation, and large-repo tasks — yes, GLM 5.2 leads on independent scores and community preference. But they were dead even on correctness in my algorithmic tests, where Kimi was far more token-efficient. Kimi also pulls ahead on tool-heavy agent loops and any task needing image input.
Which is cheaper, Kimi K2.7 or GLM 5.2?
It depends on the task. Kimi has the lower per-token input price ($0.95 vs $1.40) and was ~8× cheaper on my clean coding tasks because GLM emitted far more tokens. On harder agentic work, composio found GLM cheaper per solved task. Compare total spend on a real task rather than the sticker rate.
Can I run GLM 5.2 or Kimi K2.7 locally?
GLM 5.2 is the more approachable option — it's MIT-licensed at 753B parameters, so community quantized builds are practical, though you'll still need serious hardware. Kimi K2.7 Code's trillion-parameter MoE makes self-hosting impractical for most developers; the hosted API is the realistic path.
Do they support image input?
Kimi K2.7 Code accepts text, image, and video input natively. GLM 5.2 is text-only and needs a separate OCR or vision model to read screenshots or design files.
What are the context window sizes?
GLM 5.2 supports up to 1M tokens (max output 128K). Kimi K2.7 Code supports 256K tokens (262,144 exactly). For whole-repository context, GLM has a decisive edge.
Is Kimi K2.7 a downgrade from K2.6?
Some Reddit users report K2.7 burning more tokens per task than K2.6, raising effective cost at the same rate; others prefer K2.7's stronger agentic behavior. If you relied on K2.6, benchmark your own tasks before switching rather than assuming a straight upgrade.
The bottom line
Make GLM 5.2 your default coding model: it's stronger on front-end, holds a full repo in context, and posts the higher independent scores. Reach for Kimi K2.7 Code when the job needs image input, when you're running long tool-heavy agents, or for high-volume well-specified tasks where — as my runs showed — it matches GLM's correctness at a fraction of the tokens. Either way, check the version, effort tier, and provider behind any figure you compare, then test both on your own task for a day.
Related reading:
