Z.ai’s open-source GLM-5.2 beats GPT-5.5 on coding benchmarks at one-sixth the cost
The 753-billion-parameter model outperformed GPT-5.5 on several software engineering benchmarks, offers a 1-million-token context window, and is available under an unrestricted MIT license.
Since ChatGPT’s launch in November 2022, the AI industry’s most capable models have largely come from a small group of well-funded American labs. Open-source competitors have narrowed the gap, yet they have rarely surpassed the leaders on the benchmarks that matter most to software developers.
Now, Z.ai’s open-source GLM-5.2 may be one of the first to change that.
Today, Chinese AI startup Z.ai, formerly known as Zhipu AI, announced the release of GLM-5.2, a 753-billion-parameter open-weights large language model engineered for long-horizon autonomous coding and engineering tasks.
“We’re introducing GLM-5.2, our latest flagship model for long-horizon tasks. It marks a substantial leap in long-horizon task capability over its predecessor GLM-5.1 and, for the first time, delivers that capability on a solid 1M-token context,” Z.ai said in a blog post.
Released through Hugging Face, the Z.ai API, and more than 20 third-party coding environments, GLM-5.2 arrives with a highly stable 1-million-token context window and pricing that undercuts many leading proprietary models. The company says the model outperformed OpenAI’s GPT-5.5 across several software engineering benchmarks while costing roughly one-sixth as much to operate.
The launch marks another milestone in the increasingly competitive race between open and closed AI models. Over the past two years, companies such as OpenAI, Anthropic, and Google have dominated the top of AI benchmark rankings. Open-source models have improved steadily, though few have matched the strongest proprietary systems on complex coding and long-horizon engineering tasks.
GLM-5.2 Outperforms GPT-5.5 on Coding Benchmarks at Lower Cost
In a technical post accompanying the launch, Z.ai described GLM-5.2 as its most capable model yet for long-horizon work.
“We’re introducing GLM-5.2, our latest flagship model for long-horizon tasks. It marks a substantial leap in long-horizon task capability over its predecessor GLM-5.1 and, for the first time, delivers that capability on a solid 1M-token context.”
The company said the model introduces several major improvements, including a stable 1-million-token context window, stronger coding performance with adjustable reasoning effort levels, and architectural optimizations intended to improve efficiency at extreme context lengths.
The announcement highlights a challenge that has become increasingly important as AI coding agents become more capable. Accepting a large context window is relatively easy. Maintaining performance and consistency across hours of engineering work, debugging sessions, research projects, and large-scale software implementations is far more difficult.
To address that issue, Z.ai said it significantly expanded long-context training focused on coding-agent scenarios, including automated research, software implementation, performance optimization, and complex debugging tasks.
The company argues that the result is a model capable of sustaining performance across extended engineering workflows rather than simply supporting a larger token limit on paper.
Benchmark results show GLM-5.2 outperforming GPT-5.5
Z.ai’s claims are backed by a series of benchmark results that place the model among the strongest coding-focused AI systems currently available.
On SWE-bench Pro, a benchmark that evaluates real-world software engineering tasks, GLM-5.2 achieved a score of 62.1, surpassing GPT-5.5’s score of 58.6.
The model performed particularly well on FrontierSWE, a benchmark designed to measure an AI agent’s ability to complete long-horizon technical projects. GLM-5.2 scored 74.4%, ahead of GPT-5.5’s 72.6% and just behind Anthropic’s Claude Opus 4.8, which scored 75.1%.
According to Z.ai, GLM-5.2 trails Opus 4.8 by only a single percentage point on FrontierSWE while outperforming GPT-5.5 and Opus 4.7.
The company highlighted additional gains on PostTrainBench, a benchmark that evaluates whether AI agents can improve smaller models through post-training. GLM-5.2 ranked behind only Claude Opus 4.8 and outperformed GPT-5.5 and Opus 4.7.

GLM-5.2 benchmark comparison bar charts. Credit: z.ai
On SWE-Marathon, which focuses on ultra-long-horizon software engineering tasks such as building compilers, optimizing kernels, and developing production-grade services, GLM-5.2 remained the highest-ranked open-source model, though it still trailed Claude Opus 4.8.
The model posted strong results on other evaluations as well.
On MCP-Atlas, a benchmark that measures tool-usage capabilities, GLM-5.2 scored 77.0, compared with GPT-5.5’s 75.3.
On Humanity’s Last Exam with tools enabled, GLM-5.2 achieved a score of 54.7, ahead of GPT-5.5’s 52.2.
The model also secured first place on the crowdsourced Design Arena benchmark with an ELO score of 1360, outperforming Claude Fable 5.
Across these evaluations, GLM-5.2 consistently ranked as the highest-performing open-source model and frequently matched or exceeded the performance of leading proprietary systems.
Why long-horizon coding tasks matter
Much of the attention on AI coding assistants has focused on generating code snippets or fixing isolated bugs.
Long-horizon engineering tasks are different.
These workloads often require an AI system to manage large codebases, coordinate multiple development steps, retain context across extended periods, and complete projects that can take hours or even days.

Long-Horizon Task Evaluation GMLM 5.2 (Image credit: Z.ai)
That challenge has emerged as one of the most important tests for modern coding agents.
According to Z.ai, GLM-5.2’s expanded training at the one-million-token context length focused specifically on these scenarios. The company says the model was trained to support large-scale implementation projects, automated research workflows, optimization efforts, and complex debugging exercises.
The benchmark results suggest that investment may have paid off.
Inside the architecture powering GLM-5.2
Under the hood, GLM-5.2 introduces several architectural changes intended to improve efficiency and long-context performance.
One of the most notable is a new approach called IndexShare.
Traditional large language models perform repeated attention calculations across enormous amounts of information. Those operations become increasingly expensive as context windows grow larger.
Z.ai says IndexShare reuses the same indexer across every four sparse attention layers.
According to the company, that approach reduces per-token floating-point operations by approximately 2.9 times at the model’s maximum one-million-token context length.
GLM-5.2 also introduces improvements to its Multi-Token Prediction layer for speculative decoding.
The company says those changes increase accepted token length during inference by up to 20%.
Developers can choose between multiple reasoning modes depending on their priorities.
The “Max” setting prioritizes peak reasoning performance for difficult tasks.
The “High” setting offers a balance between performance, latency, and token consumption.
Z.ai’s benchmark data suggests the High mode retains most of the model’s performance while significantly reducing output token usage.
Frontier-level coding AI at one-sixth the cost
Performance is only part of the story.
The economics may prove just as compelling.
Z.ai charges $1.40 per million input tokens and $4.40 per million output tokens, bringing the combined cost to $5.80 per million tokens.
By comparison, GPT-5.5 costs $5.00 per million input tokens and $30.00 per million output tokens, for a total of $35 per million tokens.
That means GLM-5.2 delivers comparable coding performance at roughly one-sixth the cost.
The company also offers a cached input rate of just $0.26 per million tokens for long-context workloads, along with a limited-time promotion providing free cached input storage.
The pricing difference has attracted attention within the AI developer community.
Several observers noted that open-weight models are increasingly delivering frontier-level performance without the premium pricing associated with many proprietary systems.
The MIT license could be as important as the benchmark scores
Perhaps the most disruptive aspect of the release is not the benchmark performance or pricing.
It may be the license.
Z.ai released GLM-5.2 under an unrestricted MIT open-source license.
That means enterprises can download the model weights, modify them, fine-tune the system, deploy it on internal infrastructure, and commercialize products built on top of it without royalties or restrictive governance requirements.
The company describes the model as “Pure Open,” emphasizing that the license imposes no regional restrictions and allows unrestricted technical access.
For enterprises concerned about vendor lock-in, data sovereignty, regulatory uncertainty, or geographic access restrictions, that flexibility could prove attractive.
The release arrives at a time when access to some frontier AI models has become increasingly tied to regulatory and export-control considerations.
An open-weight model that organizations can host themselves offers a different path.
Developers react to GLM-5.2’s launch
The developers’ response was immediate.
Cline IDE praised the release on X, writing:
“GLM-5.2 is the first open-weights model to cross 80% on Terminal-Bench, and beats every other open model available.”
The team added that the model outperformed Gemini and described it as a frontier-level model available at a fraction of the cost.
Kilo Code announced day-one integration support, highlighting the model’s one-million-token context window and Max reasoning mode.
The company launched its GLM Coding Plan alongside the release.
Pricing starts at $12.60 per month for the Lite plan, rises to $50.40 per month for Pro, and reaches $112 per month for the Max tier.
The plans support third-party coding tools including Claude Code, OpenClaw, Cline, Kilo Code, Crush, and Factory.
What GLM-5.2 means for the open-source AI race
For much of the generative AI era, proprietary models have maintained a clear lead over open-source competitors.
That lead has steadily narrowed.
GLM-5.2 represents one of the strongest examples yet of an open-weight model competing directly with frontier proprietary systems on coding and software engineering workloads.
Whether the model can maintain that position as OpenAI, Anthropic, Google, DeepSeek, and other developers release new systems remains to be seen.
For now, Z.ai has delivered a message that many in the open-source community have been waiting to hear: frontier-level coding AI is no longer exclusive to closed models.

