GLM-5.2 Review (2026): The Open-Weight Model That Runs Claude Code at Half the Cost of Opus
GLM-5.2 is a 753B open-weight model that matches Claude Opus on coding at under half the cost. Real pricing, benchmarks, and when to actually use it.

GLM-5.2 is a 753-billion-parameter open-weight model from a Chinese lab that trails Claude Opus 4.8 by a single point on a long-horizon coding benchmark, ships under an MIT license, and charges $4.40 per million output tokens. That combination is why it is quietly becoming the model people run inside Claude Code.
The verdict
Buy the coding plan if you run agents all day and the bill is what hurts. GLM-5.2 delivers Opus-class long-horizon coding at a fraction of the price, and because the weights are open, nobody can price-hike you out of it later. That is the whole pitch, and it is a strong one.
It is not the model to make your default for everything. Its case is narrow and real: sustained, repository-scale coding work where output cost and context length decide the bill, and where you can tolerate a rougher ecosystem than OpenAI or Anthropic ship. For a mixed workload of writing, analysis, and light code, a frontier assistant is still the better single subscription. GLM-5.2 is a specialist you add, not a generalist you swap to.

The reason this matters now is the money. Frontier coding subscriptions have crept toward $100 to $200 a month, and API output tokens on the top models run into the double digits per million. GLM-5.2 undercuts both while scoring close enough on the benchmarks that the gap stops being the thing you notice. When a model this cheap gets within a point of the most expensive one, the price becomes the story.
What GLM-5.2 actually is
GLM-5.2 is the flagship model from Zhipu AI, which trades as Z.ai. Zhipu is a Chinese company that spun out of Tsinghua University in 2019, so the answer to the most common question about it is yes, it is Chinese, and that matters mainly if your data-residency rules say it does. Because the weights are open, you can also run it on your own hardware and never send a token to Z.ai at all, which defuses most of that concern for teams that care.
The model is a 753-billion-parameter mixture-of-experts design, meaning only a slice of those parameters fires on any given token, so it runs faster and cheaper than a dense model of the same size would. Its headline feature is a genuinely usable 1-million-token context window. Plenty of models claim a million tokens; the harder part is staying coherent that far out. Z.ai's own framing is blunt about this: a long context is easy to advertise and hard to keep reliable under real engineering pressure, and the model was trained specifically on long, messy coding-agent trajectories rather than clean synthetic text.
Under the hood, an architecture Z.ai calls IndexShare reuses a single attention indexer across every four sparse-attention layers, which cuts per-token compute by 2.9 times at full 1-million-token context. In plain terms: the thing that usually makes a huge context window expensive to run, they made cheaper, which is part of why the token price lands where it does.
The last piece is the license. GLM-5.2 is released under MIT, with the weights public on Hugging Face and, in Z.ai's words, no regional limits. MIT is about as permissive as open licenses get: you can use it commercially, modify it, and self-host it without asking anyone. That single fact is what separates GLM-5.2 from the closed frontier models it competes with, and it is the reason it belongs in the open-weight conversation rather than the closed-API one.
The benchmarks, read honestly
Z.ai puts GLM-5.2 on three long-horizon coding benchmarks, and the numbers are strong enough to take seriously and vendor-reported enough to keep at arm's length.
On FrontierSWE, an evaluation run by a third party called Proximal that measures whether an agent can finish open-ended engineering projects spanning hours, GLM-5.2 trails Claude Opus 4.8 by one point, edges out GPT-5.5 by one point, and beats the older Opus 4.7 by eleven. On PostTrainBench, which grades how well an agent can improve a smaller model given an H100 GPU, it beats both GPT-5.5 and Opus 4.7 and lands second only to Opus 4.8. On SWE-Marathon, an ultra-long-horizon test covering things like building compilers and optimizing kernels, it trails Opus 4.8 by thirteen points and again sits second to the Opus line. Across all three, it is the highest-ranked open-source model, and Z.ai's coding page adds that it ranks first among open models and second overall on LMArena Code.

Here is how to hold those numbers. The evaluators are named and independent, which is better than most launch posts, but the benchmark selection and the presentation are the vendor's, and every model here is being scored on the tasks GLM-5.2 was trained hardest for: long-horizon coding. Read them as "in the specific work this model was built for, it is a coin-flip away from the most expensive model on the market," not as "GLM-5.2 is as good as Opus at everything." Those are very different claims, and only the first one is supported. The independent signal is what closes the gap: practitioners on Reddit report GLM-5.2 matching Opus on a 45-task terminal-bench run at less than half the cost, and a widely shared thread called it the first non-Claude model that feels close to Opus inside Claude Code. That is the kind of unpaid, specific testimony that a benchmark table cannot manufacture.
What it really costs
This is where GLM-5.2 stops being interesting and starts being a decision.
On the API, GLM-5.2 lists at $1.40 per million input tokens and $4.40 per million output tokens, a price that has not moved across a month of daily snapshots. Cached input runs about 81% cheaper, near $0.27 per million, which matters more than it sounds: coding agents re-send the same repository context on every turn, so caching turns your biggest cost line into your smallest. For comparison on the same pricing source, Gemini 2.5 Pro costs $10 per million output tokens and the July GPT-5.4 update landed at $15. GLM-5.2's $4.40 output price is the number to keep in mind.

Most people will not touch the API. The reason GLM-5.2 is spreading is the GLM Coding Plan, a flat subscription that pipes the model into more than twenty coding tools, Claude Code included. Lite is $18 a month, or $12.60 a month if you pay yearly. Pro, the plan Z.ai marks as popular, is $72 a month and carries five times the Lite usage. Max is $160 a month for twenty times Lite usage. You install it with a single npx @z_ai/coding-helper command and point your existing tool at it.
Put that next to what you are replacing. A frontier coding subscription sits in the $100-to-$200-a-month range, and its usage caps are a recurring complaint. The GLM Coding Plan Lite gives you Opus-adjacent coding inside the same Claude Code interface for the price of two coffees a week. Even Pro, at $72, undercuts most of what it competes with. The honest catch is usage: "5x Lite" and "20x Lite" are relative to a base quota Z.ai does not publish in hard token numbers, so heavy agent users should expect to land on Pro or Max rather than Lite. Budget for the tier above the one that looks cheap. Even then, the cost delta against a name-brand coding subscription is large enough that the plan pays for itself the first month you would have hit a cap.
Is GLM-5.2 free?
Partly, and the distinction is worth getting right before you build a workflow on the wrong assumption.
The weights are free. GLM-5.2 is MIT-licensed and downloadable from Hugging Face, so if you have the hardware, you can run it yourself at no per-token cost forever. Z.ai also offers free access to the model through its own chat interface, which is where the "GLM-5.2 is free right now, no API key needed" posts come from. Both of those are real.
What is not free is the convenient path. The hosted API costs the $1.40 and $4.40 above, and the Coding Plan that makes it usable inside your editor starts at $18 a month. Self-hosting a 753-billion-parameter model is not a laptop job either; it means real GPU capacity, which for most people costs more than the plan. So the accurate answer is: the model is open and free to run if you bring the hardware, and cheap but not free if you want someone else to run it for you.
GLM-5.2 vs GPT and Claude for coding
The comparison people actually want is against the two models GLM-5.2 is trying to displace inside their editor. The short version is that GLM-5.2 wins on cost and long-context, and the frontier models win on breadth and polish.
Where GLM-5.2 genuinely wins: repository-scale tasks that run for hours and burn output tokens, because that is where its price and its 1-million-token context compound. It also wins any scenario where you need the weights in your own environment, which no closed model can offer at any price. On the narrow question of "is it better than GPT for coding," the answer is that it edges GPT-5.5 by a point on one long-horizon benchmark, which makes it competitive, not categorically better.
Where the frontier models still win: everything that is not a long coding session. Broader world knowledge, more reliable instruction-following on fuzzy tasks, richer tool and integration ecosystems, and the simple fact that they are the default everyone else builds around. If you are picking one model to do a bit of everything, the frontier coding models remain the safer single choice. GLM-5.2 is the second model you add when a specific, expensive workload justifies it, much the way Kimi K3 earns a slot for a different flavor of the same cost argument.
Who should run it, who should skip it
Run GLM-5.2 if you are a builder or team living inside a coding agent, watching the meter, and doing long, repository-scale work. Run it if data residency or vendor lock-in rules push you toward open weights you can self-host. Run it if your Claude Code or Cline bill has become a line item you flinch at, because the Coding Plan will cut it hard.
Skip it if you want one subscription for mixed work, if you need the deepest tooling ecosystem and the fewest rough edges, or if you are not doing enough coding volume for the price gap to matter. At low usage, the frontier models' polish is worth their premium. The break-even is real work, not occasional work.
The larger point is the one The Atlantic reached for when it called GLM-5.2 China's answer to AI sticker shock: an open-weight model this close to the frontier changes the negotiating position of everyone who codes with AI. You no longer have to accept whatever the closed labs charge, because there is now a credible, cheap, self-hostable alternative sitting one point behind them on the benchmark that matters. Even if you never switch, that is worth knowing.
Is GLM-5.2 Chinese?
Yes. It is built by Zhipu AI, which trades as Z.ai, a company that spun out of Tsinghua University in 2019. Because the weights are open and MIT-licensed, you can self-host the model and avoid sending data to Z.ai if data residency is a concern.
Is GLM-5.2 free?
The weights are free: MIT-licensed and downloadable from Hugging Face to run on your own hardware. Z.ai's chat interface also offers free access. The hosted API ($1.40 input / $4.40 output per million tokens) and the Coding Plan (from $18 a month) are paid.
Is GLM-5.2 better than GPT for coding?
On FrontierSWE, a long-horizon coding benchmark, GLM-5.2 edges GPT-5.5 by one point, so it is genuinely competitive for sustained coding work. GPT still wins on ecosystem breadth and general-purpose tasks. For pure cost-per-token on coding agents, GLM-5.2 is well ahead.
Can I use GLM-5.2 with Claude Code?
Yes. The GLM Coding Plan, starting at $18 a month, works with Claude Code and more than twenty other coding tools. You install it with a single npx @z_ai/coding-helper command and point Claude Code at the plan.
Deciding whether GLM-5.2 belongs in your setup usually comes down to how your coding agent is wired. I put the steps for pointing an agent at a cheaper model without breaking your workflow into a free Claude Code and Codex setup checklist. Subscribe to the newsletter to get it, plus the weekly read on which models are actually worth switching to.
Jul 19, 2026







