On June 13, 2026, Zhipu (Z.ai) released GLM-5.2, the strongest open-weights model shipped to date and the first one I would seriously route production coding work to [1][2]. It scores 62.1 on SWE-bench Pro where GPT-5.5 sits at 58.6, lands 74.4% on FrontierSWE about a point behind Claude Opus 4.8, and nearly ties Opus on the MCP-Atlas tool-use benchmark at 77.0 [1][2]. It has a 1M-token context window and an MIT license, so the weights are yours to download [1]. And it is cheap: 1.40permillioninputtokensand4.40 output on the Z.ai API, against GPT-5.5 at 5and30, which works out to roughly 6x less per combined token [1].
That is the headline. The move is not "switch everything to GLM-5.2." It is two separate decisions most people collapse into one: what to migrate (the 80/20, because GLM-5.2 beats GPT-5.5 on coding but is not a universal Opus replacement) and which access path to send it through, because the cheapest path has a catch. Here is how I drew both lines.
What GLM-5.2 actually beats, and what it doesn't
The benchmarks split cleanly into two stories, and reading only the first one is how you talk yourself into a migration you regret.
On coding and long-horizon agent work, GLM-5.2 is genuinely at the frontier door. SWE-bench Pro 62.1 beats GPT-5.5 (58.6) and its own predecessor GLM-5.1 (58.4) [1]. FrontierSWE 74.4% trails Opus 4.8 by about a point [2]. Terminal-Bench 2.1 jumped to 81 from GLM-5.1's 63.5, within four points of Opus [2]. MCP-Atlas tool use at 77.0 is ahead of GPT-5.5's 75.3 and shading Opus 4.8's 77.8 [2]. On the work most of us actually buy a model for, write code, refactor it, drive tools across a long task, it is competitive with models that cost six to ten times more.
The second story is the one the launch posts skip. On Humanity's Last Exam it falls clearly behind Opus 4.8, on the Tool-Decathlon it trails both Opus and GPT-5.5, and on SWE-Marathon it reaches only about half of Opus 4.8's score [2]. Its Artificial Analysis Intelligence Index composite is 51, the best of any open-weights model but well under Opus 4.8 at 61.4 [2]. Translation: the hardest, longest, most ambiguous reasoning is still not its tier.
So the honest read is narrow and useful. GLM-5.2 is a coding-grade open model that undercuts GPT-5.5 on price and matches or beats it on code, while staying a notch below Opus 4.8 on the genuinely hard reasoning. That is exactly the shape that rewards an 80/20 split, not a wholesale swap.
Stat cards: GLM-5.2 scores 62.1 on SWE-bench Pro versus 58.6 for GPT-5.5, costs roughly 6x less than GPT-5.5 at 1.40 dollars in and 4.40 dollars out per million tokens versus 5 and 30, and ships under an MIT license with a 1 million token context window so the open weights can be self-hosted
The 80/20: what to move, what to keep
The split follows the benchmark split. Move the work where GLM-5.2 ties or wins, keep the hard tail where Opus still leads.
Move to GLM-5.2. High-volume code generation and refactoring, the kind you run hundreds of times a day. Classification, extraction, and summarization, where the task is well specified and the cost per call dominates. Mid-context coding and templating. Tool-use orchestration where the steps are clear, given the MCP-Atlas result. Long-horizon SWE tasks where it is within a point of Opus and a fraction of the price. This is the volume of a normal week, and on volume the 6x price gap compounds into the only line on the invoice you will actually feel.
Want to know how effective your prompts are? Prompt Score analyzes them on 6 criteria.
Keep on the frontier. The hard 10%: ambiguous judgment calls, multi-tool reasoning with branching, anything graded by HLE-style difficulty where Opus has a real margin, and any task where being wrong is expensive enough that a point of accuracy outvalues the cost saving. This is the same escalation logic I argued when xAI shipped a $1 coding model: default down to the cheap capable tier for the volume, escalate up to the frontier for the hard tail, and let your own tests draw the line rather than a vendor's benchmark chart.
The difference this time is that the cheap tier is open-weights, which changes the second decision entirely.
Decision matrix titled the GLM-5.2 80/20 split. Left column MOVE TO GLM-5.2: high-volume code generation and refactor, classification and extraction, summarization, mid-context coding and templating, clear-step tool orchestration, long-horizon SWE within a point of Opus. Right column KEEP ON FRONTIER: ambiguous judgment calls, branching multi-tool reasoning, HLE-grade hard problems, anything where being wrong is expensive. Bottom rule: move the volume, escalate the hard tail, let your tests draw the line
The one catch: where your code goes
GLM-5.2 is made by a Chinese lab, and the cheapest way to use it, the Z.ai hosted API, routes your prompts and your code through that jurisdiction [3]. For a personal project or an open-source repo that is a non-issue. For a client's proprietary codebase, a repo under an NDA, or anything touching regulated data, sending it to that endpoint is a data-governance decision you should make on purpose, not by default because it was the cheapest line in the pricing table.
Here is why the MIT license matters beyond the price. It gives you three access paths, not one, and they trade cost against where your code physically goes:
Z.ai hosted API. Cheapest and simplest, 1.40/4.40 per million [1]. Right for non-sensitive work: personal projects, OSS, public data, throwaway prototypes.
Western gateway. OpenRouter and Cloudflare Workers AI both serve GLM-5.2 [1]. Your code still leaves your machine, but it stays with a provider under a jurisdiction and contract you already understand. Right for normal commercial work that is not especially sensitive.
Self-host the weights. The weights and an FP8 variant are on Hugging Face under MIT [1], so for the most sensitive code you run it on your own GPU and nothing leaves your boundary. This is the option no closed model gives you at any price, and it is the whole reason "open" is worth more than the discount.
The techniques you're reading about work. Test your prompts now with Prompt Score and see your score in real time.
Match the path to the sensitivity of the data, not to the bottom of the price list. The cheapest path is correct surprisingly often, but "surprisingly often" is not "always," and the failure mode is silent.
Decision tree titled choose the access path by data sensitivity. Branch one: non-sensitive code, personal or OSS or public, goes to the Z.ai hosted API, cheapest at 1.40 and 4.40 per million. Branch two: normal commercial code, not especially sensitive, goes to a Western gateway like OpenRouter or Cloudflare Workers AI, same model under a familiar jurisdiction. Branch three: proprietary, NDA, or regulated code, self-host the MIT FP8 weights on your own GPU so nothing leaves your boundary. Bottom rule: match the path to the data, not to the bottom of the price list
The prompt port: what mechanically breaks
When I moved prompts over, the content barely changed. The mechanical wrapper around the content is what broke, and it broke in the same four places every time. This is the GLM-5.2 version of the migration checklist I wrote for DeepSeek V4, and the pattern generalizes to any cross-vendor move.
Message format and roles. A prompt built around Anthropic's system array with cache_control blocks, or OpenAI's developer-role conventions, does not transfer verbatim. GLM-5.2 has its own chat template; encode the same instructions into it rather than pasting the provider-specific scaffolding across.
Tool-call schema. The function-calling envelope differs in field names and structure. The tool definitions carry over conceptually, but the wire format does not. Validate against an actual GLM-5.2 tool call before you trust your parser, because a near-miss here fails quietly.
Reasoning and thinking controls. Provider-specific knobs like a thinking_budget or an effort parameter have no one-to-one equivalent. Map the intent (deep vs fast) to GLM-5.2's own control and re-check the default, since a silent default change is the classic source of a workload that "got worse for no reason."
Sampling and stop sequences. Temperature, top-p, and stop tokens that were tuned to one model are not portable assumptions. Re-tune them against GLM-5.2 on your own inputs rather than carrying the old values across.
The rule is the same one that makes a migration cheap instead of a rewrite: the prompt content is the asset and it stays; the provider-specific wrapper is plumbing and you swap it. If your prompts are tangled up with one vendor's envelope, the port is painful. If they are written model-independently, it is a config change.
What I moved, and the one I pulled back
I ran a batch of my own prompts through this the week GLM-5.2 landed. The high-volume extraction and classification prompts moved cleanly: same content, re-encoded wrapper, output held against the same inputs, and the per-call cost dropped to a fraction. A mid-context refactoring prompt moved too and I could not tell the outputs apart on my test set. That is the 80 in the 80/20, and it was undramatic, which is the point.
Two did not move, for two different reasons. One was a genuinely hard, branching reasoning prompt where I compared outputs side by side and Opus was still visibly better on the ambiguous cases; that one stayed on the frontier, and the price saving was not worth the accuracy I would have lost. The other moved fine on quality but touched a client's proprietary code, so I pulled it off the Z.ai hosted endpoint and put it behind a self-hosted instance of the same MIT weights. Identical model, identical outputs, different path, because the data made the path decision and the benchmark had nothing to say about it.
If you take one operational habit from this, make it the side-by-side. Keep one canonical version of each prompt, run it against the same inputs on the old model and on GLM-5.2, and decide on evidence. A cheap model that ties the expensive one on your work is a real saving; a cheap model that quietly drops a point on the exact tasks where the point mattered is a regression you will not notice until it costs you.
The signal
A 753-billion-parameter open model that beats GPT-5.5 on coding for a sixth of the price, ties Opus on tool use, and can be run on your own hardware is not a one-off bargain. It is the clearest sign yet of the pattern I keep landing on: the model is the commodity and the prompt is the moat. When a capable model ships roughly every two weeks and at least one of them is open and cheap, the asset that holds its value is not the model you picked, it is the library of prompts you can move from one model to the next in an afternoon.
So treat GLM-5.2 the way you would treat any new backend: route the volume to it, escalate the hard tail past it, choose its access path by the sensitivity of your data, and keep your prompts portable enough that the next cheap frontier-class model is also a config change and not a rewrite.
Keep My Prompts lets you keep one canonical version of each prompt, score it on six quality criteria, and compare the same prompt across two models on your own inputs, so a migration becomes a measured decision instead of a guess. Free to start, no credit card required.