Kimi K2.7 vs GLM 5.2: Open-Weights Coding Compared

Moonshot's Kimi K2.7 Code and Z.ai's freshly-released GLM 5.2 are both Chinese open-weights coding flagships, both shipped in June 2026, and they trade on opposite axes. K2.7 leads on MCP tool use and pricing; GLM 5.2 leads on 1M context. We pick per workload.

Quick answer. Independent numbers have now landed for both. On Artificial Analysis's Intelligence Index v4.3.2 (read 5 October 2026) GLM 5.2 at max thinking scores 33.71 against Kimi K2.7 Code's 25.81 — so GLM 5.2 is the stronger general model, and it also holds the bigger context window (1M vs 256K). K2.7 Code is 2.7× cheaper per completed task ($0.54 vs $1.47) and leads on MCP tool use. Pick GLM 5.2 for repo-scale awareness; pick K2.7 for MCP-heavy agents on a budget.

Updated 2026-10-05: the independent benchmarks this page described as pending have landed for both models, and are quoted here against Artificial Analysis's Intelligence Index v4.3.2 at each model's top thinking tier. AA rebased the index from v4.1.1 during 2026 — the benchmark basket and aggregation both changed, so figures from the two versions are not comparable and there is no conversion factor. The "GLM 5.2 scores 53" line further down was a v4.1.1-era reading; on the current basket it is 33.71.

For the first time, the most interesting open-weights coding showdown in mid-2026 is between two Chinese flagships shipped in the same month. Moonshot's Kimi K2.7 Code and Z.ai's GLM 5.2 are both genuinely usable, both ship permissive open weights, and they take very different paths to the same agentic-coding destination. K2.7 bets on MCP tool use, reasoning-token efficiency, and prompt-cache economics. GLM 5.2 bets on a usable 1M-token context window and Coding Plan flat-rate pricing. Here's how they compare where it matters.

Update — August 14, 2026: Z.ai has shipped GLM-5.3 — and it breaks the symmetry this comparison rests on. Kimi K2.7 and GLM-5.2 both landed as open-weights flagships in the same month; GLM-5.3 did not. As of August 14 it has no open weights — Z.ai says they will follow roughly two weeks after launch (around August 28), once safety evaluation and hardening are complete — and no public API. The only access is the GLM Coding Plan, which now auto-routes GLM-5.2 and 5.1 requests to 5.3 with no documented opt-out, so plan subscribers reading this may already be talking to 5.3 rather than the 5.2 described below. The base model is unchanged from 5.2 (~753B total, 256 experts, 8 active); the claimed gains are post-training. Nothing below about K2.7, or about the downloadable MIT-licensed GLM-5.2, changes. See the GLM-5.3 launch guide.

Kimi K2.7 vs GLM 5.2: at a glance

DimensionKimi K2.7 CodeGLM 5.2
MakerMoonshot AI (China)Zhipu Z.ai (China)
ReleasedJune 2026June 13, 2026
LicenseModified MIT (open weights)MIT (open weights, week after launch)
Architecture1T-param MoE (32B active), 384 experts700B+ MoE class
Context window256K1,000,000 (usable)
Max output~64K131,072
API pricing$0.95 / $4.00 per M (cache-hit input $0.19)Coding Plan flat-rate sub; standalone API in week of launch
Multi-modalVision (MoonViT 400M) + codeText + code only
Coding positioningAgentic + MCP-first + cache-friendlyAgentic + 1M repo-scale
AA Intelligence Index v4.3.2, top tier (2026-10-05)25.8133.71
AA cost per index task (2026-10-05)$0.54$1.47
AA median output tok/s (2026-10-05)96.994.4
AA time to first token (2026-10-05)3.03 s2.93 s

What do we actually know about their coding quality?

Both shipped with vendor benchmarks only, and this page was written during that gap. Independent numbers have since arrived. Artificial Analysis now runs the same harness against both, and on Intelligence Index v4.3.2 (read 5 October 2026) it reads:

AA measure (v4.3.2, 2026-10-05)Kimi K2.7 CodeGLM 5.2 (max thinking)
Intelligence Index25.8133.71
Cost per index task$0.54$1.47
Cost to run the whole index$992.88$2,097.29
Median output tokens/sec96.994.4
Median time to first token3.03 s2.93 s

Three things to read carefully there. The GLM figure is its max thinking tier; at the default setting GLM 5.2 scores 22.43 for $1.54 per task, which is below K2.7 Code on both axes — so the tier you run matters more than the model choice for GLM. AA lists a single variant for Kimi K2.7 Code, so there is no tier ambiguity on that side. And the whole-index cost row is each model's own absolute figure, not a ratio to compare: AA runs a different number of tasks per model, so use the per-task line for comparisons.

Net: GLM 5.2 at max thinking is the stronger general model by about eight index points, and Kimi K2.7 Code is 2.7× cheaper per completed task. That resolves the "we do not know yet" framing this page originally had to use — but only on a general-capability index, not on the MCP tool-use axis where K2.7 was specifically tuned and where no neutral harness yet reports both.

The individual coding suites are still patchy: neither model has a clean set of independent SWE-bench Verified, SWE-bench Pro, LiveCodeBench, Terminal-Bench or AIDER Polyglot runs that covers both sides on the same scaffold.

Kimi K2.7 — Moonshot's published numbers:

  • Kimi Code Bench v2: 62.0 (up from 50.9 on K2.6)
  • Program Bench: 53.6 (up from 48.3)
  • MLS Bench Lite: 35.1 (up from 26.7)
  • MCP Atlas: 76.0 (up from 69.4)
  • MCP Mark Verified: 81.1 (up from 72.8)
  • ~30% fewer thinking tokens vs K2.6 on equivalent tasks

GLM 5.2 — no vendor benchmarks at launch. Zhipu published none, which is why the independent AA numbers above are doing most of the work on this side. The parent (GLM 5.1) set the bar high: 58.4 on SWE-Bench Pro (state-of-the-art at the time, narrowly ahead of GPT-5.4 and Claude Opus 4.6), 63.5 on Terminal-Bench 2.0, 68.7 on CyberGym, 70.6 on τ³-Bench. If GLM 5.2 holds those gains while adding a 1M context window, it has the makings of a serious flagship. The honest answer: until independent numbers land, that “if” is load-bearing.

So “which is better at coding” now has a partial answer. On general capability, measured by one neutral harness, GLM 5.2 at max thinking leads by about eight points. On MCP tool use, K2.7 has vendor benchmarks showing clear gains over K2.6 and no neutral counterpart for GLM. On long-horizon agentic and Terminal-Bench-style work, GLM 5.2 inherits GLM 5.1's well-documented strengths, with the 1M window as the headline addition. On cost per completed task, K2.7 wins by 2.7×.

Is the 1M context window actually useful?

It depends on whether you're doing repo-scale or task-scale work.

For a typical SaaS bug fix — read three files, change two, write a test — 256K is plenty. Kimi K2.7 handles this all day at materially lower per-task cost than GLM 5.2's Coding Plan tier. The 1M window is wasted on this workload.

For an agent that needs to understand a 200-file service before proposing a refactor, the math flips. At ~3K tokens per file, 200 files is 600K tokens — over 2× K2.7's standard window. You either use RAG (which costs context fidelity), prune aggressively (which costs correctness), or use a model that fits the input. GLM 5.2 is now the only credible open-weights answer in that range.

The right question to ask first: does your agent need to think across the entire codebase, or against a focused slice of it? That determines which model fits before pricing even enters the picture.

What do the token economics look like?

K2.7 ships with simple per-token pricing: $0.95 / $4.00 per M on Moonshot native, $0.75 / $3.50 on OpenRouter. The killer feature is cache-hit input at $0.19 per M — for agents that re-traverse the same codebase repeatedly, input cost is nearly free.

GLM 5.2 ships behind the GLM Coding Plan (Lite / Pro / Max / Team), a flat monthly subscription. Standalone per-token API arrives in the week after launch; based on GLM 5.1's API rates, expect $1-2 input / $3-6 output range — meaningfully more than K2.7 native pricing.

Artificial Analysis's measured figure says the same thing from the other side: $0.54 to complete one Intelligence Index v4.3.2 task on K2.7 Code against $1.47 on GLM 5.2 at max thinking — 2.7× cheaper, which is wider than the per-token rate gap because K2.7 also finishes in fewer tokens. If you run GLM 5.2 at its default thinking level instead, the cost barely changes ($1.54) while the score drops to 22.43, so max thinking is the setting worth paying for on GLM.

The structural difference: K2.7 wins clean on pay-per-token economics. GLM 5.2's flat-rate plan caps total monthly spend predictably regardless of usage spikes — for shops with bursty inference (one engineer kicks off a refactor at 3pm and burns 50M tokens), that's structurally cheaper than per-token. For steady predictable inference, K2.7's per-token rate plus cache-hit discount likely wins.

How does the MCP tool-use axis compare?

K2.7 was explicitly tuned against MCP Atlas and MCP Mark Verified, with the +6-8 point gains over K2.6 reflecting real workflow improvements. If your agent uses MCP-style multi-server tool orchestration, K2.7 is the better-aimed model.

GLM 5.2 inherits GLM 5.1's strong tool-use story (Asynchronous Agent RL training across 10,000+ verifiable environments, nine languages) and was designed for sustained 8-hour autonomous coding sessions. Its strength is long-horizon planning across a wide context.

The shapes are different: K2.7 is best for MCP-orchestrated multi-tool loops at moderate context. GLM 5.2 is best for long-horizon agent loops with full-codebase awareness.

Self-hosting: the two paths compared

Both ship open weights, both target a similar GPU class (8×H100 for serviceable serving), but the maturity timelines differ.

K2.7 weights are available at release. Moonshot's inference engineering is mature; vLLM, TensorRT-LLM, and SGLang support arrives reliably within 1-2 weeks of past Kimi releases.

GLM 5.2's MIT-licensed open weights land the week after the June 13 launch. Engine support follows by 1-2 weeks. Hosted endpoints (Together, Fireworks, DeepInfra, Groq) typically light up Z.ai releases within 7-14 days.

For the broader self-hosting playbook see our self-hosting LLMs guide.

Who should pick Kimi K2.7?

  • MCP-orchestrated agent stacks. The 76.0 MCP Atlas / 81.1 MCP Mark Verified scores reflect real workflow improvements over K2.6.
  • Workloads with high prompt-cache reuse. $0.19 per M cache-hit input tokens makes re-traversal of the same codebase nearly free on input cost.
  • Thinking-token-bound runs. 30% fewer thinking tokens vs K2.6 compounds over a fleet of agentic runs.
  • Pay-per-token economics. Flat predictable per-token rates without a subscription floor.
  • Mixed text + image inputs. MoonViT vision encoder is included.

Who should pick GLM 5.2?

  • Repo-scale agents on monorepos. 1M-token context is the only credible open-weights answer for full-codebase awareness without RAG.
  • Shops already on the GLM Coding Plan. The flat-rate predictability + bundled Z.ai tooling is the package.
  • Long-horizon autonomous coding sessions. 8-hour sustained-execution claims inherited from GLM 5.1.
  • Teams that want the freshest open-weights research target. MIT license, fresh release, full fine-tuning leverage.

The decision in a line

Repo-scale agent on a 500-file monorepo? GLM 5.2. MCP-orchestrated multi-tool loop on a focused codebase slice? K2.7. Workload in between? Run both side-by-side on 100 representative tasks; per-task cost and per-task quality gaps both reveal themselves in fewer than 10 runs.

Post-launch reality (June 15, 2026)

Two days after Z.ai shipped GLM 5.2 on June 13, here is what is actually confirmed vs still pending. We are pulling from the launch announcement, the Hacker News reception thread, vendor docs, and early third-party reviewers.

What is live today on the Coding Plan

  • GLM 5.2 access ships included on every Coding Plan tier at no extra cost: Lite $10/mo, Pro $30/mo, Max $80/mo, plus seat-based Team pricing. Quarterly billing drops the same tiers to roughly $27 / $81 / $216 per quarter.
  • Drop-in tool integrations confirmed at launch: Claude Code, Cline, OpenCode, Roo Code, Goose, Crush, OpenClaw, Kilo Code — all via the OpenAI-compatible endpoint (three settings.json changes for Claude Code; nothing custom needed).
  • Cursor, Continue and Aider are NOT yet wired. Cursor has an open community thread requesting GLM-5 support but no merged work; expect community config repos in the weeks after the open-weights drop.
  • Two thinking-effort levels exposed: High and Max — no Low/Auto. Thinking adds roughly 30-80% to first-token latency and roughly halves throughput on long runs.

What is still pending (as of June 15)

  • Standalone per-token API not yet live on open.bigmodel.cn / z.ai/pricing. Z.ai said "next week" on launch day. For sizing, GLM 5.1 standalone runs $1.40 input / $4.40 output per M tokens; expect GLM 5.2 to land near or below that.
  • MIT-licensed open weights not yet on Hugging Face. Promised "next week" — track huggingface.co/zai-org for the GLM-5.2 repo and a matching GLM-5.2-FP8 companion, mirroring the 5.1 release pattern.
  • Hosted-provider endpoints (Together, Fireworks, DeepInfra, Groq, OpenRouter) — none list GLM 5.2 yet because the weights are not public. Expect 3-10 day catch-up after the MIT drop based on the GLM 5.1 cadence; Fireworks and DeepInfra were first on 5.1.
  • chat.z.ai still serves GLM 5.1 in the free chatbot tier; 5.2 chatbot rollout is part of the same "next week" batch.

What independent benchmarks exist

Honest answer: none on the standard suites yet. As of 48 hours post-launch no third party has published SWE-bench Verified, SWE-bench Pro, LiveCodeBench, Terminal-Bench 2.0, AIDER Polyglot, GPQA Diamond, or HumanEval scores specifically for 5.2. Artificial Analysis, vals.ai, lmcouncil.ai and the SWE-bench Pro Leaderboard all showed GLM 5.1 as the most recent Zhipu entry at that point, so anyone quoting a SWE-bench number for 5.2 in mid-June was conflating it with 5.1. Updated October 5, 2026: those boards have since scored 5.2 itself. The Artificial Analysis figure has to be restated — the "Intelligence Index 53" reading was taken under index v4.1.1, which AA has since rebased to v4.3.2 with a different benchmark basket and no conversion factor between versions. On v4.3.2, read 5 October 2026, GLM 5.2 scores 33.71 at max thinking (22.43 at default) and Kimi K2.7 Code scores 25.81. The non-AA figures stand as read in August: vals.ai SWE-bench Verified 82.80% (#14), LiveBench 73.2, LMArena 1471. GLM-5.3 is also on AA now — 44.78 at max, $2.01 per index task — as is GLM 5.3 Flash at 41.81 for $0.25, so the "no public API, therefore no independent numbers" situation described below has resolved.

What we DO have: the GLM 5.1 baseline holds well — 58.4 on SWE-Bench Pro (state-of-the-art at that time, narrowly ahead of GPT-5.4 and Claude Opus 4.6), 63.5 on Terminal-Bench 2.0 standalone (66.5 with Claude Code scaffolding), 68.7 on CyberGym, 70.6 on τ³-Bench, 71.8 on MCP-Atlas Public Set. If 5.2 holds these gains while extending to 1M context, it is a peer-class flagship; that is the bet community devs are taking until the third-party runs land.

Community sentiment after the first 48 hours

The Hacker News reception thread (269+ points, 146 comments within hours) split into two consistent camps:

  • Positive — "punches above its weight" on UI/design code, code taste, and modern conventions. One commenter described shipping a non-trivial GTK/Rust/Lua app where "GLM wrote 93%." Another flagged 1M context as the upgrade most likely to matter in practice: stop chunking files, just dump the relevant subset.
  • Cautious — "about six months behind the frontier labs, similar to Opus in January" on architecture-heavy, multi-file reasoning. Run-to-run variance and harness sensitivity (Terminal-Bench swung 40.4% → 48.3% on GLM 5 depending on agent wrapper) are unresolved carry-overs from earlier GLM releases.

The HN top comment captures the practical verdict: "Test it today if you are already on the Coding Plan; do not rebuild your stack around it until third-party benchmarks land next week."

Architecture details that matter for capacity planning

Same architecture family as GLM 5/5.1: 744B total parameters / ~40B active per token, 384 experts, 61 layers with Multi-head Latent Attention, DeepSeek Sparse Attention for the long context, 28.5T pretrain tokens. For self-host capacity planning the practical numbers are:

  • BF16 weights: ~1.65 TB on disk
  • FP8 weights: ~800 GB on disk
  • AWQ/GPTQ INT4: ~200 GB on disk
  • Production sweet spot: 8× H200 SXM (1,128 GB HBM) at FP8 with room for the 1M-token KV cache. 8× H100 80GB (640 GB) is too tight for FP8 + long context — works only at ≤128K with aggressive KV offload.
  • vLLM and SGLang already have GLM 5/5.1 recipes that 5.2 will load on the same code paths once the config drops. TensorRT-LLM lags by a few weeks on new architectures.
  • The MIT license, when it ships, has no field-of-use restrictions, no MAU threshold, and no acceptable-use clause. The only obligations are the standard copyright-notice + no-warranty boilerplate.
  • Zhipu has been on the US BIS Entity List since January 15, 2025. Downloading and using MIT-licensed open weights is not a regulated export under current EAR readings, BUT US federal customers and most defense primes will not approve a Chinese-origin model regardless of license — treat as effectively blocked for FedRAMP, DoD, and IC workloads.
  • EU AI Act: GLM 5.2 is a GPAI model with likely systemic-risk-tier compute (10^25 FLOPs). Zhipu has not signed the GPAI Code of Practice and has not published a model card or training-data summary, which leaves the full Article 53 burden on downstream EU deployers. Finance, health and critical-infrastructure use cases need to wait for Annex XI documentation.

Bottom line vs Kimi K2.7 Code: different bets, both credible, and now with one neutral tiebreaker. K2.7 wins on MCP tool use (76.0 MCP Atlas / 81.1 MCP Mark Verified), cache-hit input pricing ($0.19/M), immediately-available open weights, and cost per completed task ($0.54 against $1.47 on AA's Intelligence Index v4.3.2 — 2.7× cheaper). GLM 5.2 wins on the context window (1M vs 256K), the flat-rate Coding Plan for bursty workloads, the inherited GLM 5.1 SWE-Bench Pro / Terminal-Bench leadership, and general capability on the neutral index (33.71 at max thinking against 25.81). Repo-scale agent on a monorepo, or anything where broad capability matters more than unit cost? GLM 5.2. MCP-orchestrated multi-tool loop on a focused codebase slice, or a tight token budget? K2.7.

One more thing worth saying in October that could not be said in June: both have been overtaken inside their own families. On Intelligence Index v4.3.2, GLM-5.3 scores 44.78 at max thinking and GLM 5.3 Flash scores 41.81 at $0.25 per index task, while Moonshot's Kimi K3 scores 43.59. If you are choosing fresh rather than deciding between these two specifically, start there — and note that GLM 5.3 Flash in particular is both stronger and cheaper than either model on this page.

FAQ

Is Kimi K2.7 or GLM 5.2 better for coding?

On general capability, GLM 5.2 — and this is now measured rather than inferred. Artificial Analysis scores GLM 5.2 at max thinking 33.71 on Intelligence Index v4.3.2 (read 5 October 2026) against Kimi K2.7 Code's 25.81. K2.7 wins on economics, at $0.54 per completed index task against $1.47, and on MCP tool use, where its vendor scores (76.0 MCP Atlas, 81.1 MCP Mark Verified) have no neutral GLM counterpart. Run GLM 5.2 at max thinking if you pick it: at the default tier it scores 22.43, below K2.7, for the same money.

Which model has the bigger context window?

GLM 5.2 at 1,000,000 tokens vs K2.7's 256K — roughly 4× larger. For repo-scale agents on large monorepos, GLM 5.2 is the only realistic open-weights option in that range.

Which is cheaper to run?

K2.7, on both measures that can be checked. Per token, K2.7 native ($0.95 / $4) undercuts GLM 5.2's standalone API rates ($1.40 / $4.40 at the GLM 5.1 baseline). Per completed task, Artificial Analysis measures $0.54 on K2.7 Code against $1.47 on GLM 5.2 at max thinking — 2.7× cheaper on Intelligence Index v4.3.2. On flat-rate subscription the GLM Coding Plan can still be materially cheaper for bursty heavy usage, because it caps spend rather than metering it.

Can I self-host both models?

Yes. Both ship MIT-class open weights and need an 8×H100 node for serviceable serving at full context.

Does either support image inputs?

K2.7 has MoonViT (400M vision encoder). GLM 5.2 is text + code only. Z.ai has separate multi-modal models (GLM-Vision family).