by Z.ai · GLM-5 family · best for open-weights frontier coding agents
GLM-5.2 is the moment open weights stopped trailing: Z.ai's flagship 753B-parameter MoE (40B active) beats GPT-5.5 on multiple long-horizon coding benchmarks — SWE-bench Pro 62.1 vs 58.6 — at roughly one sixth the price, under a plain MIT license with a 1M-token context window. Released 2026-06-16, it took the #1 open-weights slot on the Artificial Analysis Intelligence Index (51) within a week, and its selectable reasoning effort plus visible thinking make it the most credible self-hostable alternative to the closed frontier as of mid-2026.
| Benchmark | Score | Source |
|---|---|---|
| Humanity's Last Exam | 40.5% | huggingface.co 2026-06-16T00:00:00.000Z |
| GPQA Diamond | 91.2% | huggingface.co 2026-06-16T00:00:00.000Z |
| Terminal-Bench | 81% | huggingface.co 2026-06-16T00:00:00.000Z |
| Artificial Analysis Index | 51 | artificialanalysis.ai 2026-07-03T00:00:00.000Z |
Six personas, six verdicts — the same panel that reviews every product on TopReviewed.
“The first open-weights model I can put in front of the board as a frontier alternative — MIT license, sixth of the cost, receipts attached.”
GLM-5.2 changes the build-vs-buy calculus: for the first time the open-weights option is not a capability compromise on the workloads that matter commercially (agentic coding), and the MIT license removes every legal ambiguity that plagued Llama-community and Qwen-license evaluations. The strategic risks are vendor-adjacent rather than technical — Z.ai is a Chinese lab with no compliance story, so regulated industries must consume it through Western inference providers or self-host behind their own governance. Exit costs are near zero, which is itself a negotiating lever against incumbent closed vendors.
“Open weights stopped trailing the frontier here — every closed vendor's pricing power just took a structural hit.”
This is the release that turns "open is 18 months behind" into a stale talking point. Taking the #1 open-weights slot on Artificial Analysis within a week while beating GPT-5.5 on long-horizon coding gives GLM-5.2 the exact wedge — agentic engineering — where token volumes and therefore economics are largest. The market timing is impeccable: it landed as enterprises hit the wall on frontier-model bills for agent fleets. Z.ai's weakness is distribution and trust in Western enterprise, which the Together/Fireworks/DeepInfra hosting layer only partially solves.
“GPT-5.5-class coding output at $1.40/$4.40 — the line item drops by 80% and the license fee is zero.”
The unit economics are the story: $1.40/$4.40 first-party against $5/$30 for GPT-5.5, with DeepInfra floor pricing at $0.95/$3.00 and an 81% cache discount. For agent fleets burning billions of tokens monthly, that is not an optimization, it is a budget category change. Two cautions keep this from a 10: reasoning verbosity (AA logged 140M eval tokens — very verbose) claws back some of the headline savings, and there is no batch tier yet. Self-hosting pencils out only at very large scale given the multi-node footprint; most buyers should stay on aggregators.
“It holds together on hour-long agent trajectories where cheaper models wander — and the thinking is fully visible when it doesn't.”
The tuning for "long, messy coding-agent trajectories" is noticeable in practice: Terminal-Bench 2.1 at 81.0 and MCP-Atlas 76.8 track with sturdy multi-step tool use, and the visible reasoning plus selectable effort makes failure modes debuggable in a way closed frontier models never are. OpenAI-compatible endpoints across all major hosts mean integration is trivial. The gaps: no vision (screenshot-driven flows need a sidecar), host quality varies widely (benchmark your provider, not the model), and 131K output caps on most hosts undercut the 163K native ceiling.
“Frontier-quality answers at aggregator prices, and I can read its mind — but it does go on, and it can't see my screenshots.”
For heavy daily use through OpenRouter-style access, GLM-5.2 delivers the strongest quality-per-dollar of any model this year: hard technical questions, competition math, and long-document analysis all land at or near closed-frontier level, at 166 t/s with a 1.39s first token. Visible reasoning is genuinely useful for checking its work. The friction points are verbosity — reasoning mode produces walls of thinking that slow perceived responsiveness — and the text-only ceiling, which sends screenshot and PDF-image questions elsewhere. Effort selection helps tune the chattiness once you learn it.
“The numbers are real and independently corroborated — the things to distrust are the missing ones: no cutoff, no safety story, no governance.”
Unusually for a Chinese-lab release, the headline claims survive scrutiny: the SWE-bench Pro and Terminal-Bench numbers are on the public model card, echoed by independent trackers, and the AA Index placement is third-party. The skeptical residue is about omissions rather than exaggerations. Knowledge cutoff is undisclosed. There is no safety framework, no stated input-retention policy, and no compliance surface — "MIT license" also means "nobody is accountable." AIME 2026 at 99.2 says more about benchmark saturation than about intelligence. And the beats-GPT-5.5 framing is true on long-horizon coding specifically; on the broad AA index it still trails the closed frontier by a visible margin (51 vs the high-50s tier).
Long-horizon coding agents where cost-per-trajectory dominates — the SWE-bench Pro and Terminal-Bench numbers translate directly to agentic IDE and CI workloads at a fraction of frontier pricing. Sovereignty-sensitive deployments that need frontier-class capability under a clean MIT license. Math-heavy and research workloads (AIME 99.2, GPQA 91.2) on a budget. Teams already running open-weights stacks who want one model to close the gap with closed flagships without renegotiating anything.
The full research notes behind this review — verified against primary sources.
A 753B-parameter mixture-of-experts activating 40B per token (the glm_moe_dsa variant), with the headline innovation in attention: IndexShare sparse attention reuses one indexer across every four sparse-attention layers, which Z.ai measures as a 2.9x per-token FLOPs reduction at 1M-token context — the mechanism that makes the long window economically usable. An improved multi-token-prediction layer raises speculative-decoding acceptance length by up to 20%. Expert count and layer depth are not broken out in the model card; the full technical report is at arxiv.org/abs/2602.15763. Knowledge cutoff is undisclosed.
Coding and agentic work are the design center (9.2): the model is explicitly tuned for "long, messy coding-agent trajectories," and Terminal-Bench 2.1 at 81.0 plus MCP-Atlas 76.8 back that up — these are the numbers that put it ahead of GPT-5.5 on long-horizon work. Math is the strongest single axis (9.5, AIME 2026 at 99.2). Reasoning (9.2) is benchmark-anchored by GPQA Diamond 91.2 and HLE 40.5 (54.7 with tools), with selectable effort and fully visible thinking. Long context (9.0) is credible because the sparse-attention design targets 1M tokens directly rather than bolting it on. Text-only — vision and OCR score 0; no built-in web search (0 on real-time data). Instruction following and function calling are strong (8.8/9.0) per its agent-first tuning; creative writing (7.5) and safety calibration (7.5) are editorial estimates — Z.ai publishes no safety framework, so self-hosters own their own guardrails.
| Benchmark | Score | Note | Source |
|---|---|---|---|
| SWE-bench Pro | 62.1 | vs GPT-5.5's 58.6 | Z.ai model card |
| Terminal-Bench 2.1 | 81.0 | Terminus-2 harness | Z.ai model card |
| GPQA Diamond | 91.2 | graduate-level science | Z.ai model card |
| AIME 2026 | 99.2 | near-ceiling competition math | Z.ai model card |
| HLE | 40.5 (54.7 with tools) | Humanity's Last Exam | Z.ai model card |
| MCP-Atlas | 76.8 | tool-use orchestration | Z.ai model card |
| AA Intelligence Index | 51 | #1 open-weights | Artificial Analysis |
Vendor-published scores are on the Hugging Face model card and are corroborated by independent coverage (VentureBeat, Interconnects, Artificial Analysis); the AIME 2026 result uses the current-year exam, so it does not map onto the AIME 2025 column used elsewhere in this catalog.
Artificial Analysis measures 166.6 output tokens/sec with 1.39s time-to-first-token — genuinely fast for a 753B-class model, thanks to the 40B active footprint and the improved MTP speculative decoding. Host variance is real: P95 latency ranges from ~11s (FriendliAI) to far slower on Z.ai's own congested first-party endpoint, so provider choice matters for interactive use. The model is verbose in reasoning mode (AA logged 140M output tokens across its eval suite), which affects both latency and bills.
| Surface | Cost | Notes |
|---|---|---|
| API input | $1.40 / 1M tok | Z.ai first-party |
| API output | $4.40 / 1M tok | Z.ai first-party |
| Cached input | $0.26 / 1M tok | 81% discount |
| Third-party hosts | from $0.95 / $3.00 | DeepInfra floor pricing |
| Self-host | free weights | MIT license |
Roughly one sixth of GPT-5.5's rate card at the first-party price, and cheaper still on aggregators. No public batch tier as of verification.
The full open-weights menu: MIT-licensed weights on Hugging Face (zai-org/GLM-5.2) with no regional or commercial restrictions, first-party API at Z.ai, and hosted inference on Together, Fireworks, DeepInfra, Novita, and FriendliAI. Self-hosting a 753B MoE is a multi-node commitment — this is a cluster model, not a workstation model — but the 40B active parameters keep serving costs in check for the class. Max output is 163,840 tokens natively; most third-party hosts cap near 131K.
Z.ai publishes no formal safety framework, no compliance certifications, and no stated training-data or input-retention policy — standard for Chinese open-weights labs but a real gap for regulated buyers. The MIT license transfers full responsibility to the deployer: content moderation, refusal behavior, and data governance are yours to build. Enterprises wanting the capability with Western compliance wrapping should route through US-based inference providers and layer their own moderation.
OpenAI-compatible API across Z.ai and all major aggregators; standard Python/TypeScript SDK access; day-one support in vLLM/SGLang-based serving stacks and hosted on Together, Fireworks, DeepInfra, Novita, and FriendliAI. Community adoption was immediate on release — within a week it displaced prior open flagships as the default "big open model" in agent frameworks. Too new for a settled list of notable products; popularity is growing fast from a strong open-source base.
Yes — $1.40/$4.40 first-party (from $0.95/$3.00 on DeepInfra) against $5/$30, with an 81% cache discount, and it scores higher on SWE-bench Pro. Verbose reasoning output narrows but does not close the gap.
Yes, without restrictions — the weights are plain MIT, the cleanest license of any frontier-class model.
Legally yes, practically only at cluster scale: 753B total parameters is multi-node territory even with 40B active. Most teams should use Together, Fireworks, DeepInfra, or Novita instead.
No — text-only. Pair it with a vision model if your agents consume screenshots.
The sparse-attention design (IndexShare) targets the long window directly with a 2.9x FLOPs cut, and long-trajectory benchmarks are its strongest results; still, most hosts cap output around 131K.
Undisclosed. Assume you need retrieval for anything time-sensitive.
Not from Z.ai. Route through a Western inference provider with its own certifications, or self-host behind your existing controls.
The closed flagship GLM-5.2 is measured against — stronger on the broad intelligence index and multimodal, but behind on SWE-bench Pro (58.6 vs 62.1) at roughly six times the price.
The other big open-weights June release — stronger on SWE-bench Verified disclosure (70.7) and RULER long context, but heavier to host (550B/55B active vs 40B active) and under a custom license rather than MIT.
The proprietary Chinese flagship alternative — adds vision and slightly higher AA placement at launch, but closed weights and ~1.8x the token price make it the opposite trade.
Primary references used to verify this review.
Last verified 2026-07-02