Models · · 2 min read

GLM-5.2 is the strongest open-weights coding model yet — and it's MIT-licensed

Z.ai released GLM-5.2's full weights under an MIT license on June 16, 2026 — a 753B-parameter Mixture-of-Experts coding model with a 1M-token context. It beats GPT-5.5 on SWE-bench Pro and FrontierSWE at roughly one-sixth the cost, and is the first open model to cross 80% on Terminal-Bench, though it still trails Claude Opus 4.8 on coding. Here's what it means if you build with coding agents.


Chinese AI lab Z.ai released GLM-5.2 to its Coding Plan subscribers on June 13, 2026, then published the full open weights under an MIT license on June 16. (Source: Z.ai official blog, 2026-06-16) For builders, the headline isn’t a frontier crown — it’s that the strongest open-weights coding model to date is now free to download, fine-tune, and self-host, and it undercuts GPT-5.5 on price by roughly 6×.

Key facts:

  • GLM-5.2 is a 753-billion-parameter Mixture-of-Experts model. (Source: Z.ai / Hugging Face model card, 2026-06-16)
  • The context window is 1M tokens (1,048,576), which Z.ai says “stably sustains long-horizon work.”
  • The weights are MIT-licensed with no regional limits — you can run them commercially and locally.
  • API pricing is $1.40 per million input tokens and $4.40 per million output tokens ($0.26 cached input). (Source: llm-stats, 2026-06-17)
  • It is the first open-weights model to cross 80% on Terminal-Bench, scoring 81.0. (Source: Z.ai blog, 2026-06-16)
Official GLM-5.2 benchmark chart from Z.ai comparing GLM-5.2 against GLM-5.1, Claude Opus 4.8, GPT-5.5 and Gemini 3.1 Pro across coding and reasoning benchmarks including Terminal-Bench 2.1, SWE-bench Pro and FrontierSWE
Z.ai's official GLM-5.2 benchmark chart: strongest open-source model on coding, closing in on the closed-source frontier. (Source: Z.ai official blog / GLM-5 GitHub)

Where it actually lands

Be honest about the numbers. GLM-5.2 is the best open model and beats GPT-5.5 on two coding benchmarks, but it still trails Anthropic’s Claude Opus 4.8 on most of them.

BenchmarkGLM-5.2Claude Opus 4.8GPT-5.5GLM-5.1
Terminal-Bench 2.181.085.084.062.0
SWE-bench Pro62.169.258.658.4
FrontierSWE74.475.172.630.5
AIME 202699.295.798.395.3
GPQA-Diamond91.293.693.686.2

(Sources: Z.ai blog and digitalapplied benchmark analysis, 2026-06-17)

GLM-5.2 edges GPT-5.5 on SWE-bench Pro (62.1 vs 58.6) and FrontierSWE (74.4 vs 72.6), and on Terminal-Bench 2.1 it lands within a few points of Opus 4.8 (81.0 vs 85.0). The jump over its own predecessor is the bigger story: Terminal-Bench 2.1 went from 62.0 to 81.0, and FrontierSWE from 30.5 to 74.4. (Source: Z.ai official blog, 2026-06-16) Z.ai also ships a new architecture trick, IndexShare, which reuses one indexer across every four sparse-attention layers to cut per-token FLOPs by 2.9× at 1M context — that’s what makes the long-context price viable.

What it means if you’re building

The MIT weights plus an OpenAI-compatible API make this a low-friction drop-in. You can pull zai-org/GLM-5.2 from Hugging Face and serve it locally with vLLM (vllm serve "zai-org/GLM-5.2") or SGLang, or call the hosted glm-5.2 endpoint through 20-plus third-party coding tools. If you already run Claude Code as a daily driver, pointing an agent at a GLM endpoint is a config change, not a rewrite — the same swap you’d make to test Qwen3.7-Max or DeepSeek’s Reasonix against each other.

The economics are the real pitch. At $1.40/$4.40 per million tokens — roughly one-sixth the per-token cost of GPT-5.5 — long-horizon agent loops that burn millions of tokens get materially cheaper, and an MIT license means no vendor can revoke your access the way hosted models can be suspended overnight.

Two caveats before you bet a platform on it. It still trails Opus 4.8 on most coding benchmarks, and several of these numbers are vendor-reported — wait for independent SWE-bench Pro and Terminal-Bench re-runs, the same caution that applies to any vendor table including Claude Code vs Codex comparisons. And the hosted Z.ai API routes your code through servers in China; if data residency matters, run the open weights yourself rather than calling the hosted endpoint — which is exactly what MIT weights let you do.

Sources

Source: Z.ai official blog