GLM-5.2 is Z.ai's open-weights flagship and the current open high-water mark: a 753B-parameter MoE (40B active) under MIT licence with a usable 1M-token context. It matches GPT-5.6 Luna on the Intelligence Index at 51, beats GPT-5.5 on SWE-bench Pro and FrontierSWE, and beat Claude Code on Semgrep's IDOR security benchmark with zero scaffolding.
Visit GLM-5.2Beats GPT-5.5 on coding benchmarks
Z.ai's model card puts GLM-5.2 at 62.1 on SWE-bench Pro and 74.4 on FrontierSWE, ahead of GPT-5.5's 58.6 and 72.6 respectively, a first for an open-weights release, though Claude Opus 4.8 still leads on both.
Outscored Claude Code on IDOR detection
In Semgrep's late-June cyber benchmark, GLM-5.2 with no scaffolding hit 39% F1 on Insecure Direct Object Reference detection, beating Claude Code's 32%, at roughly $0.17 per vulnerability found.
MIT-licensed 753B MoE with 1M context
Roughly 753B total parameters with about 40B active per token, a usable 1M-token context window, and an IndexShare attention optimisation that cuts per-token compute around 2.9x at full context. Weights are on Hugging Face under MIT, with no regional restrictions.
GLM-5.2 is the open-weights model that finally makes the 'open catches up' argument without asterisks. Released by Z.ai (formerly Zhipu AI) in June 2026 under an MIT licence, it beats GPT-5.5 on the two coding benchmarks that matter most, matched the top score on Artificial Analysis's Intelligence Index, and embarrassed a proprietary agent in an independent security test. It is not the best model in the world, Claude Opus 4.8 still holds that ground, but it is the best model you can download.
What GLM-5.2 is

GLM-5.2 is the flagship model from Z.ai, the Beijing lab formerly known as Zhipu AI, and it currently sits as the high-water mark for open-weights AI. It reached GLM Coding Plan subscribers on 13 June 2026, and the full weights landed on Hugging Face three days later, on 16 June, under an MIT licence with no regional restrictions. That last clause matters: unlike several nominally open releases that carry usage carve-outs or geographic gates, GLM-5.2 can be downloaded, modified, fine-tuned and deployed commercially by anyone, anywhere. An FP8 variant is available alongside the full-precision weights, which makes serious self-hosting somewhat less punishing.
The headline claim is simple and, unusually, well supported: this is the most capable model whose weights you can actually hold. Artificial Analysis scores it 51 on its Intelligence Index v4.1, the maximum recorded, equal to GPT-5.6 Luna and the highest score any open-weights model has posted. On coding specifically, Z.ai's own model-card figures put it ahead of GPT-5.5 on both SWE-bench Pro and FrontierSWE. It does not dethrone Claude Opus 4.8, which remains ahead on every coding benchmark where the two meet, but the gap between the best open model and the best closed one has never been this narrow.
For context within the open-weights field, GLM-5.2 tops DeepSeek-V4-Pro across the board. The gap on SWE-bench Pro is 62.1 to 55.4, and on FrontierSWE it is a chasm: 74.4 against 29.0. Whatever the leaderboard politics between Chinese labs, the numbers here are not close.
Architecture: a 753B MoE built for long context
GLM-5.2 is a Mixture-of-Experts transformer with roughly 753 billion total parameters, of which only about 40 billion are active per token. That sparse activation is what makes a model of this scale even theoretically self-hostable: at inference time you are paying for a 40B-class forward pass, not a 753B one, though you still need the memory to hold the full expert set.
The context window is the more interesting engineering story. GLM-5.2 offers a usable 1M-token context ('usable' being the operative word, since plenty of models advertise long windows that degrade badly in practice) with a maximum output of around 131,072 tokens. The mechanism Z.ai leans on is called IndexShare: rather than each sparse attention layer computing its own token index, the same indexer is reused across every four sparse attention layers. Z.ai's figure is that this cuts per-token compute by roughly 2.9x when running at the full 1M-token context.
The practical consequence is that long-context work (whole-repository analysis, multi-document review, extended agent sessions) is not just possible but economically sane. Long context has historically been where inference costs quietly triple; IndexShare is a direct attack on that cost curve, and it shows up in the pricing discussed later in this review.
- ~753B total parameters, ~40B active per token (Mixture-of-Experts)
- 1M-token usable context; ~131,072-token maximum output
- IndexShare: one indexer shared across every four sparse attention layers, ~2.9x per-token compute saving at full context
- FP8 variant published alongside full-precision weights
Benchmarks: ahead of GPT-5.5, behind Opus 4.8
Z.ai's model card makes claims that would normally invite scepticism, but the independent numbers largely back them. On SWE-bench Pro, GLM-5.2 scores 62.1 against GPT-5.5's 58.6; on FrontierSWE it posts 74.4 against GPT-5.5's 72.6. An open-weights model beating OpenAI's flagship on the two most-watched software engineering benchmarks is the story of this release. The necessary caveat comes in the same table: Claude Opus 4.8 scores 69.2 on SWE-bench Pro and 75.1 on FrontierSWE, so Anthropic's flagship keeps its lead on both, decisively on SWE-bench Pro.
The reasoning numbers are strong to the point of near-saturation: 91.2 on GPQA-Diamond and 99.2 on AIME 2026. The one clearly soft spot in the model card is ProgramBench, where GLM-5.2's 63.7 trails Opus 4.8's 71.9 by a wide margin, worth remembering when the marketing suggests parity across the board.
Third-party measurements are consistent with the self-reported picture. Artificial Analysis puts GLM-5.2 at 51 on its Intelligence Index v4.1, the joint-highest score recorded, and at 58 on its Coding Agent Index, which is run inside the Claude Code harness. Its cost figure is striking: $0.32 per Intelligence Index task, which feeds directly into our own Value For Money Index, where GLM-5.2 posts 159, the kind of number only cheap-and-capable models produce. On Terminal-Bench 2.1, drawn from Semgrep's coverage, it scores 81.0, four points off Opus 4.8's 85.0, and it sits second globally on Code Arena. The honest summary: second-best at coding overall, first among anything you can download, and far cheaper per unit of capability than either rival.
Where it sits on the Intelligence Index
Artificial Analysis Intelligence Index v4.1 across every scored frontier model: this model highlighted.
The Semgrep result: beating Claude Code at finding IDOR bugs
The most talked-about independent data point arrived in late June 2026, when the security firm Semgrep published a cyber benchmark under the memorable title 'We have Mythos at Home'. The test that mattered measured how well coding agents detect Insecure Direct Object Reference (IDOR) vulnerabilities, the class of bug where an application lets a user reach another user's records simply by changing an identifier. IDOR detection is a good stress test because it requires reasoning about authorisation logic across files, not pattern-matching a known signature.
GLM-5.2, run with no scaffolding (no custom harness, no security-specific prompting apparatus) scored 39% F1 on IDOR detection. Claude Code, the incumbent agentic tool in this space, scored 32%. The cost figure Semgrep reported is arguably more consequential than the accuracy one: roughly $0.17 per vulnerability found. At that price, running the model continuously across a large codebase as a background security reviewer becomes a defensible line item rather than an experiment.
Semgrep itself supplied the caveat, and it deserves equal billing: both models trailed Semgrep's own purpose-built multimodal pipeline, which achieves 53–61% F1 on the same task. A general-purpose model beating a general-purpose agent is notable; neither yet replaces dedicated tooling. A 39% F1 also means the majority of IDOR bugs go unfound and a meaningful share of findings are noise. The right reading is that GLM-5.2 is a remarkably cheap first-pass security reviewer, not an appsec team.
Running it: self-host, API, or something in between

Because the weights are MIT-licensed, you have genuine options. Self-hosting is free in licence terms and eye-watering in hardware terms: a 753B-class MoE needs serious infrastructure even with only ~40B parameters active per token, since the full expert set has to live somewhere. The FP8 variant and quantised community builds bring the memory floor down considerably, and for teams with existing GPU estates or hard data-residency requirements, that route is realistic in a way it never was for closed flagships. For everyone else, the API is the sensible default.
Z.ai's hosted API is priced at $1.40 per million input tokens and $4.40 per million output tokens. Combined with the IndexShare-driven long-context efficiency, that pricing is what produces the $0.32-per-task figure from Artificial Analysis and the 159 on our Value For Money Index. You are getting near-frontier coding capability at a fraction of frontier prices.
There is also a healthy middle path. As of our 10 July 2026 snapshot, GLM-5.2 has 24 live provider endpoints on OpenRouter, the most of any model the platform tracks. That breadth matters in practice: it means competitive pricing pressure between hosts, easy failover, and no single-vendor dependency for a model you may be building serious workflows on. Few models, open or closed, offer this much routing flexibility.
Cost per Intelligence Index task, in context
What a unit of benchmarked work actually costs across the field. Lower is better.
Limitations
The clearest limitation is that GLM-5.2 is second, not first. Claude Opus 4.8 beats it on SWE-bench Pro (69.2 vs 62.1), FrontierSWE (75.1 vs 74.4), Terminal-Bench 2.1 (85.0 vs 81.0) and, most sharply, ProgramBench (71.9 vs 63.7). If you need the absolute ceiling of coding capability and cost is secondary, this is not the model that moves you off Anthropic. The ProgramBench gap in particular suggests there are classes of programming task where the difference is not marginal.
The Semgrep result also needs handling with care, because it is already being over-read. Beating Claude Code at 39% F1 is a genuine achievement for an unscaffolded model; it is also a score that misses most vulnerabilities in the test set and trails purpose-built pipelines by 14 to 22 points. Treat it as evidence of strong code-reasoning economics, not as a green light to replace security tooling.
Finally, the practicalities. Self-hosting a 753B-parameter MoE is out of reach for most organisations regardless of the licence, which means the 'open' benefit is, for many users, really about provider choice and auditability rather than running it yourself. And as with any self-reported model card, Z.ai's own figures deserve the standard discount, though it is fair to say the independent numbers from Artificial Analysis and Semgrep have so far corroborated rather than contradicted them.
Verdict

GLM-5.2 is the most consequential open-weights release we have reviewed, and the first where 'open' does not require grading on a curve. It beats GPT-5.5 on the coding benchmarks that drive real purchasing decisions, matches the top recorded Intelligence Index score, and does it at $1.40/$4.40 per million tokens under a licence that lets you do essentially anything with it. The Semgrep result, outperforming Claude Code on IDOR detection at pennies per finding, is the kind of independent, adversarial validation that self-reported model cards cannot buy.
The decision framework is straightforward. If you need maximum coding capability and budget is not the constraint, Claude Opus 4.8 remains the better model, and the ProgramBench gap says that plainly. If you need frontier-adjacent capability with cost efficiency, deployment freedom, provider choice across 24 OpenRouter endpoints, or the option to bring the model in-house, GLM-5.2 is now the default answer. Its 159 on our Value For Money Index is the highest we have recorded for a model in this capability class.
Z.ai has done something the open-weights ecosystem has promised for years and rarely delivered: shipped a model that competes on capability rather than on ideology. Recommended, with the specific caveats above.
GLM-5.2 benchmark results
Equal to GPT-5.6 Luna; highest open-weights score
GPT-5.5: 58.6; Claude Opus 4.8: 69.2
GPT-5.5: 72.6; Claude Opus 4.8: 75.1
Claude Opus 4.8: 85.0
vs Claude Code 32%, no scaffolding
Figures from the Z.ai model card, Artificial Analysis, and Semgrep, June–July 2026. Self-reported model-card numbers have so far been corroborated by independent testing.
Where GLM-5.2 fits
Agentic coding on a budget
With a 58 on the Coding Agent Index and $0.32 per Intelligence Index task, GLM-5.2 suits teams running high-volume agentic coding workflows (pull-request generation, refactoring, test writing) where Opus-class pricing would make the economics untenable.
Continuous security review
The Semgrep result points to a practical pattern: run GLM-5.2 as a cheap, always-on first-pass reviewer for authorisation bugs like IDOR at roughly $0.17 per finding, with dedicated tooling and human review downstream. A supplement to appsec, not a substitute.
Whole-repository and long-document analysis
The usable 1M-token context, made affordable by IndexShare's ~2.9x compute saving at full window, fits tasks that defeat shorter-context models: reasoning across an entire monorepo, large legal or technical document sets, or long-running agent sessions.
Data-sensitive and regulated deployments
The MIT licence with no regional restrictions means organisations with data-residency or auditability requirements can self-host the FP8 or quantised builds on their own infrastructure, an option no closed frontier model offers at this capability level.
Fine-tuning a frontier-class base
Because the weights are fully open, GLM-5.2 can serve as a base for domain-specific fine-tunes (internal codebases, specialised technical corpora), starting from the strongest open checkpoint available rather than a mid-tier one.
Sources & further reading
Z.ai (Zhipu AI) Model Timeline
1M tokens context
Frequently Asked Questions
Is GLM-5.2 really open source?
The weights are released under the MIT licence with no regional restrictions, which permits commercial use, modification, and redistribution. Published to Hugging Face on 16 June 2026, with an FP8 variant available. Whether open weights constitute 'open source' in the full sense is a live debate, but in practical terms this is as unrestricted as model releases get.
Does GLM-5.2 actually beat GPT-5.5 at coding?
On the two headline benchmarks, yes: 62.1 vs 58.6 on SWE-bench Pro and 74.4 vs 72.6 on FrontierSWE, per Z.ai's model card. Claude Opus 4.8 remains ahead of both models on both benchmarks, so GLM-5.2 is best read as the second-strongest coding model overall and the strongest with open weights.
Can I run GLM-5.2 on my own hardware?
Legally, yes: the MIT licence is unrestricted. Practically, a 753B-parameter Mixture-of-Experts needs serious infrastructure even though only ~40B parameters are active per token. FP8 and quantised community builds lower the bar considerably; for most users the hosted API at $1.40/$4.40 per million tokens, or one of the 24 OpenRouter provider endpoints, is the realistic route.
What did the Semgrep benchmark actually show?
In Semgrep's late-June 2026 'We have Mythos at Home' benchmark, GLM-5.2 with no scaffolding scored 39% F1 on IDOR vulnerability detection, beating Claude Code's 32%, at roughly $0.17 per vulnerability found. Semgrep stressed that both trailed its own purpose-built multimodal pipeline at 53–61% F1, so the result signals strong cheap code reasoning rather than a replacement for security tooling.
How does GLM-5.2 compare with DeepSeek-V4-Pro?
GLM-5.2 tops DeepSeek-V4-Pro across the board on Z.ai's model card. On SWE-bench Pro it leads 62.1 to 55.4, and on FrontierSWE the gap is dramatic: 74.4 against 29.0. Among open-weights models, GLM-5.2 is currently clear of the field.
Specifications
AI Evaluation
The first open-weights model that competes on capability rather than ideology. Beats GPT-5.5 on the coding benchmarks that drive purchasing decisions, under a licence that lets you do anything with it.
Pros
- Highest open-weights Intelligence Index (51)
- MIT licence, no regional restrictions
- 24 OpenRouter serving endpoints - most of any model
Cons
- Opus 4.8 still clearly ahead on hard coding
- 753B-class self-hosting needs serious hardware
- ProgramBench gap (63.7 vs Opus 71.9) is real
Related Tools
GitHub Copilot
GitHub Copilot is Microsoft's AI pair programmer, built into VS Code, JetBrains IDEs and GitHub.com. It offers inline code completion, a chat interface, an autonomous coding agent and support for multiple underlying models including GPT and Claude, making it one of the most widely deployed AI coding assistants.
FLUX
FLUX, from Black Forest Labs, is a family of high-quality open and commercial image generation models prized for photorealism and prompt adherence. Widely integrated across third-party tools and APIs, it has become a default backbone for image generation.
Windsurf
Windsurf (formerly Codeium) is an agentic AI code editor built around its 'Cascade' flow for multi-step, multi-file coding. It is a leading rival to Cursor in the AI-IDE space, with strong autocomplete and agentic capabilities.
