
GLM-5.2 is the open-weight model Z.ai announced on June 17, 2026. It put an open model in the same coding conversation as GPT-5.5 and Claude Opus 4.8, though its published numbers back only part of that reputation. And anyone planning to use Z.ai's own Coding Plan should know that, since launch, the plan has stopped serving GLM-5.2 at all.
What is GLM-5.2, Z.ai's open-weight coding model?
GLM-5.2 comes from Z.ai, the Beijing lab formerly known as Zhipu AI. Z.ai files it as its flagship foundation model, text in and text out, aimed at long-horizon work: coding and agent tasks that keep going for hours across a whole codebase instead of ending after one reply.
"Open-weight" means the trained model files are published. You can download them and run the model on your own machines, instead of renting access to it through someone else's API.
GLM-5.2 at a glance (Z.ai's published specs)
744B parameters, MoE, and the IndexShare architecture
GLM-5.2 has 744B parameters, but only a slice of them works on any given token. It is a Mixture-of-Experts (MoE) model: a router hands each token to a few specialist sub-networks, so about 40B parameters are active at once. That keeps serving costs in reach, although you still have to store every one of the 744B.
Some write-ups quote 753B instead. That is the count the Hugging Face page displays; Z.ai's own download table says 744B-A40B, and it lists GLM-5.1 at exactly the same size. The gains in 5.2 did not come from a bigger model.
Most of what changed is how the model copes with long input. The context window, meaning how much text it can keep in view in one request, now reaches 1M tokens. To keep that affordable, a technique Z.ai calls IndexShare has groups of four attention layers share one indexer, which Z.ai says cuts compute per token by 2.9× at full length.
A reworked multi-token prediction layer also raises the acceptance length for speculative decoding by up to 20%. That buys speed rather than better answers.
"We propose IndexShare, which reuses the same indexer across every four sparse attention layers, reducing per-token FLOPs by 2.9× at a 1M context length." — from the IntroductionView official source →
The MIT license and what it allows
The weights ship under MIT, one of the shortest and most permissive licenses in common use. You can run the model commercially, change it, fine-tune it and build products on it, and Z.ai adds that no regional limits apply.
That gives you two things a closed model can't. Your prompts and code never have to leave your own servers, and the model you tested stays exactly the model you tested. The second point matters more than usual with GLM-5.2, because Z.ai's Coding Plan now routes requests for it to GLM-5.3.
"An MIT open-source license — no regional limits, technical access without borders" — from the IntroductionView official source →
GLM-5.2 benchmarks against GPT-5.5 and Claude Opus 4.8
Z.ai's model card sets GLM-5.2 against GPT-5.5 and Claude Opus 4.8 in one long table. Three coding rows carry most of the argument, and they don't all point the same way.
Three coding benchmarks from Z.ai's model card
Where GLM-5.2 wins: SWE-bench Pro and FrontierSWE
SWE-bench Pro gives a model real issues from real repositories to fix. GLM-5.2 scores 62.1 there, against 58.6 for GPT-5.5, and up from 58.4 for GLM-5.1.
FrontierSWE hands an agent open-ended engineering projects that run for hours. GLM-5.2 edges GPT-5.5 by 74.4 to 72.6 and lands within a point of Opus 4.8.
The two wins don't carry equal weight. Z.ai ran SWE-bench Pro itself with the OpenHands agent, while FrontierSWE was scored by an outside evaluator, Proximal, so the result that puts GLM-5.2 closest to Opus 4.8 is the one Z.ai didn't grade.
"On this benchmark, GLM-5.2 trails Opus 4.8 by only 1%, while edging out GPT-5.5 by 1% and Opus 4.7 by 11%." — from the FrontierSWE resultsView official source →
Where GPT-5.5 and Claude Opus 4.8 still lead
Opus 4.8 comes out ahead on all three rows, and on SWE-bench Pro the gap is wide: 69.2 against 62.1. Terminal-Bench 2.1 tests work inside a real command line. There GLM-5.2 finishes last of the three with 81.0, behind GPT-5.5 at 84.0 and Opus 4.8 at 85.0.
That terminal ranking depends on the harness, the agent program that drives the model. The same table has a second row where each model runs in its best reported harness: GLM-5.2 scores 82.7 there and passes Opus 4.8 at 78.9, while GPT-5.5 stays on top at 83.4.
So the accurate summary is narrower than "beats GPT-5.5": on FrontierSWE's long projects, GLM-5.2 sits level with the closed models. It trails Opus 4.8 on repository fixes, and its terminal score shifts with the tooling around it. For what Anthropic changed in its own model, see Claude Opus 4.8: Pricing, Fast Mode, Workflows.
"on Terminal-Bench 2.1 (81.0) it lands within a few points of Claude Opus 4.8 (85.0)" — from the GLM-5.2 section of the READMEView official source →
GLM-5.2 pricing and the GLM Coding Plan
There are three ways to pay for GLM-5.2, and each is billed on a different basis. The API charges per token, the Coding Plan is a monthly subscription for coding tools, and self-hosting has no license fee but a large hardware bill.
API pricing per million tokens
Z.ai publishes one price list for all its GLM models. As of September 2026 the rates, in US dollars per million tokens, are:
| Model | Input | Cached input | Output |
|---|---|---|---|
| GLM-5.2 | $1.4 | $0.26 | $4.4 |
| GLM-5.3 | $1.4 | $0.26 | $4.4 |
| GLM-5.1 | $1.4 | $0.26 | $4.4 |
| GLM-5 | $1 | $0.2 | $3.2 |
Cached input is the line to watch if you run coding agents. They resend the same files and instructions on every turn, and tokens served from the cache cost less than a fifth of fresh input; storing that cache is free for a limited time.
GLM-5.2 costs the same as GLM-5.1 and GLM-5.3, so switching among them changes nothing on the bill. GPT-5.5 isn't on this price list, so no cost ratio against it can be read from Z.ai's figures. Check OpenAI's current rates yourself rather than relying on the "one-sixth the cost" line that has circulated since launch.
"This page provides pricing information for Z.AI’s models and tools. All prices are in USD." — from the top of the Pricing pageView official source →
Lite, Pro, and Max Coding Plan tiers
The GLM Coding Plan starts at $18 a month for Lite, with Pro and Max above it. Every tier has two credit pools, and a request needs room in both: one refills 5 hours after you spend it, the other resets weekly. The weekly pool always holds exactly five 5-hour pools, so draining the 5-hour pool five times uses up the week.
GLM Coding Plan credit allowances
| Plan | Credits per 5 hours | Credits per week |
|---|---|---|
| Lite | 2,000 | 10,000 |
| Pro | 12,000 | 60,000 |
| Max | 28,000 | 140,000 |
Credits are not tokens. At GLM-5.3's rates a request costs (input × 6.9 + cached input × 1.7 + output × 24) ÷ 10,000 credits, and off-peak use is charged at 50%. Peak hours are 14:00–18:00 Singapore time, Monday to Friday.
A request with 100,000 fresh input tokens and 5,000 output tokens costs 81 credits at the standard rate or 40.5 off-peak, so Lite's 5-hour pool covers about 24 of them at peak. Agents that lean on cached context stretch much further, since cached input costs about a quarter as many credits as fresh input.
Reviews written around launch describe a 3× peak and 2× off-peak multiplier instead. That was the rule in Z.ai's June announcement, and the current overview page has replaced it with the credit table above.
"Each plan is subject to both a 5-hour usage limit and a weekly usage limit. / During off-peak hours, model usage is charged at 50% of the standard credit rate" — from the Usage Credit Allowance and Credit Calculation sectionsView official source →
Setting up GLM-5.2 in Claude Code and other agents
GLM-5.2 doesn't need an editor of its own. Z.ai's announcement names ZCode, its own desktop agent, alongside Claude Code and OpenCode, and the Coding Plan page adds Cline. You keep the tool you already use and change only the model behind it.
Switching the model name and using the 1M context
Z.ai's instruction comes down to one setting: set the model name to GLM-5.2. In Claude Code, enter GLM-5.2[1m] instead to open the full 1M-token context.
Pointing Claude Code at GLM-5.2
- Get access through Z.ai's Coding Plan or an API key
- Set the model name to GLM-5.2
- For the 1M-token context, use GLM-5.2[1m]
- Choose High or Max thinking effort
Reasoning effort, which sets how long the model thinks before it answers, is the remaining setting. GLM-5.2 accepts only high and max, and falls back to max when you leave it unset, so pick high for routine edits where a faster reply matters more.
To call the API directly, use the model id glm-5.2 on Z.ai's chat-completions endpoint. The OpenAI SDK works too once base_url points at https://api.z.ai/api/paas/v4/.
"You can enable GLM-5.2 now by updating the model name to "GLM-5.2" (or GLM-5.2[1m] in Claude Code to enable 1M context length)." — from "Use GLM-5.2 with GLM Coding Plan"View official source →
Self-hosting frameworks if you skip the plan
If you'd rather run the weights yourself, the model card names five inference frameworks. Each needs at least the version below:
| Framework | Minimum version |
|---|---|
| SGLang | 0.5.13.post1 |
| vLLM | 0.23.0 |
| Transformers | 0.5.12 |
| KTransformers | 0.5.12 |
| Unsloth | 0.1.47-beta |
For Ascend NPU hardware, the repository points to vLLM-Ascend, xLLM and SGLang. Fine-tuning has two supported routes: slime (v0.3.0+), the reinforcement-learning framework Z.ai's own team uses, and ms-swift (v4.4.0+) for SFT, PPO and GRPO.
None of these frameworks makes a 744B model small. If you want to try it on ordinary hardware, GLM 5.2 local: run 744B on a 24 GB PC, no GPU covers an engine that keeps most of the weights on disk, along with the speeds to expect.
Why the Coding Plan now routes GLM-5.2 to GLM-5.3
As of September 2026, Z.ai's Coding Plan page says every plan serves GLM-5.3 and GLM-5.3-Flash. Requests that name GLM-5.2 or GLM-5.1 are sent to GLM-5.3 automatically, so your Claude Code setting can still read GLM-5.2 while the answers come from its successor.
"Requests for GLM-5.2/GLM-5.1 will be automatically routed to GLM-5.3, requests for GLM-4.7 will automatically be routed to GLM-5.3-Flash." — from "Supported Models"View official source →
Same base model, post-training-only gains
The swap is smaller than a version change suggests. According to Z.ai's README, GLM-5.3 wasn't pretrained from scratch: it is GLM-5.2's base model with more post-training on top.
Z.ai reports those gains as large: a 50% improvement over GLM-5.2 on its in-house Z.ai Code Bench, plus the open-source lead on Terminal Bench 3.0 and Agents' Last Exam. The 50% comes from a benchmark only Z.ai runs, so read it as the vendor's own figure. GLM-5.3-Flash is a separate model built on a new 320B base with 18B active, not a variant of either.
The API side of GLM-5.3 differs in small ways too, such as a third reasoning-effort level, low. GLM 5.3 benchmarks, pricing, and open weights covers the successor in detail.
"GLM-5.3 uses the same base model as GLM-5.2 — every gain comes from post-training." — from the GLM-5.3 section of the READMEView official source →
What this means if you specifically want GLM-5.2
If you simply want Z.ai's best coding model, the routing is a free upgrade. If you need GLM-5.2 itself, to reproduce a benchmark, compare against an earlier run or keep behavior fixed in production, the Coding Plan can no longer promise it.
The pay-as-you-go price list still gives GLM-5.2 its own row and says nothing about sending it elsewhere; the routing note sits on the Coding Plan page. The open weights remain on Hugging Face and ModelScope in BF16 and FP8, and they are the one route that pins the version for good: a model you host changes only when you change it.
GLM-5.2 is the open-weight model that edged past GPT-5.5 on two of the three coding benchmarks in Z.ai's table, while Opus 4.8 stayed ahead on all three. Calling it costs $1.4 in and $4.4 out per million tokens, and hosting it costs nothing in license fees if you have the hardware. Z.ai's own subscription has already moved on to GLM-5.3, though, so which model you actually get depends on the route you choose.
FAQ
- Is GLM-5.2 free to use?
- The weights are free: they are published under the MIT license and can be downloaded from Hugging Face or ModelScope. Running a 744B model yourself takes serious hardware, though, and hosted access is paid: $1.4 per million input tokens and $4.4 per million output tokens on Z.ai's API, or a GLM Coding Plan from $18 a month.
- Is GLM-5.2 better than GPT-5.5?
- On two of the three coding rows in Z.ai's model card, yes: 62.1 against 58.6 on SWE-bench Pro and 74.4 against 72.6 on FrontierSWE. On Terminal-Bench 2.1 GPT-5.5 is ahead, 84.0 to 81.0. Claude Opus 4.8 scores higher than both on all three.
- Can I use GLM-5.2 in Claude Code?
- Yes. Z.ai's instruction is to change the model name to GLM-5.2, or to GLM-5.2[1m] in Claude Code for the full 1M-token context, and to pick High or Max thinking effort. Through the GLM Coding Plan, though, requests naming GLM-5.2 are now answered by GLM-5.3.
- Is GLM-5.2 an open-source LLM?
- Z.ai describes its license as MIT open source, and the weights really are free to use, modify and ship. The model card and README publish the model itself in BF16 and FP8, and neither releases the training data, which is why open-weight is the more exact term.



