GLM-5.2 vs. Kimi K2.7 Code – split-screen illustration with Z-letter mark and crescent moon symbol

    GLM-5.2 vs. Kimi K2.7 Code: Two Open-Weight Releases in One Week – Two Very Different Bets

    21. Juni 20267 min read
    Till Freitag

    TL;DR:GLM-5.2 (Z.ai, June 16) and Kimi K2.7 Code (Moonshot, June 12) shipped in the same week. Both open weight, both in the same pricing band. But: GLM-5.2 is a generalist long-horizon all-rounder with a 1M context and currently leads the Artificial Analysis Intelligence Index for open weights. Kimi K2.7 Code is a coding-specialised agent that uses 30% fewer thinking tokens. Pick the wrong one and you pay twice."

    Till Freitag

    One week, two releases, two strategies

    In mid-June 2026, the Chinese open-weight camp doubled down twice within four days:

    • June 12, 2026 – Moonshot AI ships Kimi K2.7 Code. Open source, Modified MIT, a coding-focused agent built on K2.6.
    • June 16, 2026 – Z.ai (formerly Zhipu) ships GLM-5.2. Open weight, MIT, a generalist long-horizon model with a 1M-token context.

    Both models land in roughly the same pricing band, both are free to use commercially (with the usual thresholds), and both are described in the first wave of tweet threads as "the other one, but better."

    That's wrong.

    Put both releases side by side and you see: Z.ai and Moonshot deliberately made opposite bets. One goes wide (context, generalism, Pareto frontier). The other goes deep (coding specialisation, token efficiency). Which one is right for you depends on what you actually want running overnight.

    The sober spec table

    SpecGLM-5.2Kimi K2.7 Code
    ReleaseJune 16, 2026June 12, 2026
    VendorZ.ai (Zhipu AI), ChinaMoonshot AI, China
    ArchitectureMoEMoE (built on K2.6)
    Total parameters744B~1T
    Active parameters / token40B32B
    Context window1,000,000 tokens256,000 tokens
    LicenseMITModified MIT
    SpecialisationGeneralist + long-horizon reasoningCoding agent + long-horizon engineering
    Distinct benchmark highlightAA Intelligence Index 51 (leads open weights)+21.8% on Kimi Code Bench v2 vs. K2.6
    Distinct efficiency highlight+11 points AA Index at same size as GLM-5.1–30% thinking tokens vs. K2.6
    Available onHuggingFace, Z.ai API, CloudflareHuggingFace, Kimi API, Kimi Code CLI

    Two things jump out immediately:

    1. The context gap. GLM-5.2 has an order of magnitude more context than K2.7 Code (1M vs. 256K). This is not a marketing spec detail. It's a different class of use cases (more below).
    2. The efficiency axis. GLM-5.2 is more efficient per intelligence point (same size, +11 AA Index). Kimi K2.7 Code is more efficient per task (–30% thinking tokens at better coding performance).

    Both teams optimised – but on different axes.

    GLM-5.2: the generalist on the Pareto frontier

    Z.ai positioned GLM-5.2 explicitly as a "long-horizon tasks" model. The single most important data point from the release material:

    GLM-5.2 is the new leading open-weights model on the Artificial Analysis Intelligence Index (score 51) and sits on the Pareto frontier of Intelligence vs. Cost per Task.

    Translation: for every dollar you spend on inference, no other open-weight model currently gives you more intelligence. And it does that at the same model size as GLM-5.1 – the +11 index points come from better training and reasoning RL, not from more parameters.

    The three levers that make GLM-5.2 interesting for builders:

    • A solid 1M-token context window. Not "advertised" – stably held across long trajectories. That means: a mid-size repo, a quarterly documentation set, or a multi-session agent run fits into a single inference call without RAG hacks.
    • Advanced coding with flexibility. Coding benchmarks land close to proprietary frontier models, without Z.ai turning it into a coding-only model. Suitable for mixed pipelines (code + docs + reasoning).
    • MIT license. No MAU threshold, no commercial restrictions, no "Modified". For enterprises with compliance concerns, this is much easier to audit.

    If you're building an agent today that needs to manage heterogeneous workloads – writing code, drafting docs, analysing a 200-page PDF, generating a sales deck – GLM-5.2 is the more interesting choice. It matches our reading in AI Abstraction Layer: you want one model that covers the bulk of routine work, and you only burn expensive frontier calls on the hard 10%.

    Kimi K2.7 Code: the specialist that thinks less

    Moonshot placed a different bet with K2.7 Code. Instead of broadly improving K2.6 (see Kimi K2.6 Deep-Dive), they surgically specialised the model for agentic coding.

    Three headline numbers from the release:

    • +21.8% on Kimi Code Bench v2 over K2.6 – Moonshot's internal real-world benchmark for long engineering trajectories
    • –30% thinking tokens per task vs. K2.6, while improving end-to-end task completion
    • Modified MIT with the same 100M-MAU threshold as K2.6 – irrelevant for most builders

    The 30%-fewer-thinking-tokens point is subtle but economically significant. Long-horizon coding agents burn tokens in the reasoning step. If your SWE-Bench-style tasks need 30% fewer tokens, not only do your inference costs drop – the wall-clock time of the agent drops with them, which is immediately noticeable on multi-hour runs.

    What K2.7 Code is not:

    • No longer a generalist in the breadth that K2.6 had. If you're building multi-domain agents, stay on K2.6 or test GLM-5.2.
    • Not a 1M-context model. For very large repos you still need RAG / skill routing.
    • Not a full swarm stack. The 300-sub-agent coordination from K2.6 remains the reference for swarm use cases.

    If you're self-hosting Cursor- or Claude-Code-like coding pipelines today, K2.7 Code is the economically more interesting choice. If you want to optimise what sub-agents do inside a coding workflow in depth, read our Agentic Coding Tools Landscape in parallel.

    Which model for which use case

    Instead of a "winner" verdict, here's the decision matrix we use internally:

    Use caseRecommendationWhy
    Long-horizon coding agent (refactor repo, work tickets)Kimi K2.7 CodeSpecialised, –30% tokens, +21.8% real-world bench
    Generalist agent with mixed workloads (code + docs + analysis)GLM-5.2Pareto frontier, 1M context, MIT
    Very long context needed (>256K tokens)GLM-5.2Only open-weight option with a solid 1M context
    Swarm coordination, many heterogeneous sub-agentsKimi K2.6 (not K2.7 Code)Swarm stack with 300 sub-agents stays unchanged in K2.6
    EU data sovereignty, on-prem deploymentBoth possibleBoth vLLM-/SGLang-compatible, MIT or Modified MIT
    Maximum compliance simplicityGLM-5.2Pure MIT, no MAU threshold

    Concretely on our side: we currently run K2.7 Code for agentic coding pipelines in the internal toolchain and watch GLM-5.2 as the default generalist for internal long-horizon workflows. A final verdict on whether either fully replaces the previous generation (K2.6, Claude Opus 4.6) won't come before four weeks of production use.

    Strategically: why both releases hit the same week

    GLM-5.2 and Kimi K2.7 Code arriving within a week of each other is no coincidence. It's the continuation of a pattern we've tracked since the China AI offensive in 2025: Chinese labs clock open-weight releases tightly, often in waves, often shortly before or after frontier-closed-model releases from US labs.

    The market effect:

    1. The price anchor for proprietary models keeps getting pulled down. Anyone at OpenAI or Anthropic charging 10× more for a task than a comparable open-weight model has to justify that premium – with latency, reliability, tool ecosystem, or compliance.
    2. Builders get a realistic open-weight backup for every task. Coding? Kimi K2.7 Code. Generalist? GLM-5.2. Long-horizon swarm? Kimi K2.6. Nobody needs to lock a critical pipeline to a single closed-source vendor.
    3. Specialisation accelerates. K2.7 Code is a coding fork of K2.6. It's not unlikely that we'll see browser forks, research forks, and data-analyst forks over the next months – one optimised open-weight specialist per use case.

    Any builder still thinking "open weight is always a trade-off against frontier" has been optimising on the wrong axis for about six months. The question isn't whether you can use open weight, it's which one you pick for which workload.

    What you can do practically this week

    1. Test both models on HuggingFace. zai-org/GLM-5.2 and moonshotai/Kimi-K2.7-Code. Both run with vLLM and SGLang without custom patches.
    2. Run one real-world task per model. Not benchmarks – an actual task from your backlog. Count tokens, wall-clock time, and subjective output quality.
    3. Classify the use case honestly. Coding-specialised or generalist? More than 256K context needed? The answer is 80% of the model choice.
    4. Read the license text. MIT vs. Modified MIT sounds like a detail – for legal it matters. At MAU >100M, Kimi's Modified MIT threshold becomes real.

    Bottom line: two models, two bets, one insight

    GLM-5.2 and Kimi K2.7 Code aren't competitors in the narrow sense. They're two clear answers to two different questions:

    • "How do I build the cheapest generalist long-horizon agent?" → GLM-5.2.
    • "How do I build the most efficient coding agent that stays coherent over hours?" → Kimi K2.7 Code.

    Anyone lumping both models together as "the Chinese open-weight thing" misses the actual leverage: the right specialisation per workload. That's where the builder advantage lies in 2026 – not in picking a model, but in assembling a model constellation that cleanly separates generalist from specialist.


    → Kimi K2.6: Long-Horizon Agents Deep-Dive → Agentic Coding Tools Landscape → AI Abstraction Layer: why you don't pick a model, you pick a constellation → China AI offensive: the pattern behind the open-weight waves → Set up open-weight for your stack – talk to us

    TeilenLinkedInWhatsAppE-Mail

    Related Articles

    Stylized Mistral flame as a Mixture-of-Experts network on a dark background
    June 8, 20265 min

    Mistral 3, Large 3 & Vibe: Why the Latest Update Puts Europe's AI Hope Back in the Game

    Mistral flipped the script in six months: Mistral 3 with Large 3 (675B MoE) as open weights, Medium 3.5 as the new defau

    Read more
    Visualization of Kimi K2.6 long-horizon agents: a Moonshot crescent symbol alongside distributed sub-agent nodes over a coordination gridDeep Dive
    April 21, 20268 min

    Kimi K2.6: The Most Interesting AI Optimization in 2026 Isn't Intelligence – It's Duration

    Moonshot AI open-sourced Kimi K2.6 yesterday. 1 trillion parameters, 300 sub-agents, 13 hours of autonomous code refacto

    Read more
    Kimi K2.5: The Chinese Open-Weight Model Behind Cursor's Composer 2
    March 26, 20265 min

    Kimi K2.5: The Chinese Open-Weight Model Behind Cursor's Composer 2

    Cursor's Composer 2 is secretly built on Moonshot AI's Kimi K2.5 – a 1 trillion parameter open-weight model from Beijing

    Read more
    Z.ai GLM-5.2 – performance comparison against Claude and Western frontier models
    June 25, 20265 min

    Z.ai GLM-5.2 – why the next frontier leap comes from China

    Z.ai ships GLM-5.2 – more than doubling GLM-5.1, close to Claude Fable 5, cheaper, deployable on-prem. While US frontier

    Read more
    Visualization of a large pale neural network sphere and a smaller bright sphere in cyan/yellow – the shrinking frontier of open models
    June 8, 20265 min

    Nex-N2-Pro: How the Open-Model Frontier Shrunk 75 % in Six Weeks

    Six weeks ago, DeepSeek-V4-Pro with 1.6 trillion parameters was the largest open-weight model ever released. Today, Nex-

    Read more
    Stylized number 5 made of orange ribbons and gears – cover for Claude Sonnet 5Deep Dive
    June 30, 20269 min

    Claude Sonnet 5: Agentic AI Goes Mainstream

    Anthropic ships Claude Sonnet 5 – a Sonnet model that gets close to Opus 4.8 performance at a fraction of the price. Aug

    Read more
    AI Benchmarks Explained: Arena, SWE-Bench, AutomationBench & Co.
    June 26, 20266 min

    AI Benchmarks Explained: Arena, SWE-Bench, AutomationBench & Co.

    How do AI benchmarks actually work – from LMArena to SWE-Bench to Zapier's AutomationBench? A tour of Elo rankings, stat

    Read more
    AutoClaw by Z.ai – AI agent that turns a chat message into real executed work
    June 25, 20265 min

    AutoClaw: Z.ai's Agent That Doesn't Chat – It Works

    AutoClaw is Z.ai's agent layer – not a chatbot, but an AI partner that actually executes tasks. What it does, how it tea

    Read more
    Gemma 4 12B Coder running locally on a developer laptop – code symbols streaming from a 12B chip
    June 15, 20264 min

    Gemma 4 12B Coder: Local Code Generation Becomes the Default

    Google ships the Gemma 4 12B Coder — the specialized coding variant of the Gemma 4 stack. 12B parameters in GGUF format,

    Read more