China’s Low-Priced Z.ai Model Is Exposing Costly Coder Habits
Zain Hasan, an AI engineer at Together AI, has taught himself to use AI coding assistants while still keeping an eye on cost. He directs difficult problems to a frontier model, meaning one near the current state of the art in reasoning and capability, such as Anthropic’s Fable. But if the task that Hasan is outsourcing is more straightforward, he directs it to a less capable—and less expensive—language model.
Right now, the cheaper model, for him, tends to be GLM 5.2. Released on 16 June by the Beijing-based lab Z.ai, GLM 5.2 is an open-weights model, meaning any organization with sufficient hardware can download and host the model for free.
Those that pay Z.ai for GLM access still can save money, because the company’s API costs $4.40 per million output tokens. That’s less than a fifth of the comparable price for access to Anthropic’s Opus 4.8 model, and a tenth the price of Anthropic’s Fable coding model. An output token is the basic unit of text a model generates in response to a prompt.
Yet many software engineers around the world, Hasan said, aren’t yet fully mindful of the net AI pricetag for a given coding project.
“A lot of companies right now, they’re still trying to figure this technology out, and so there isn’t really a token budget,” said Hasan. And when someone else is paying, the rational move for many software engineers is to skip tabulating costs entirely. “The easiest thing is to pick the most powerful model.”
That price-be-damned habit, reinforced by loose token budgets in software companies today, may now be the widest moat protecting the U.S. frontier AI labs.
Z.ai narrows benchmark gap with U.S. rivals
Z.ai’s GLM 5.2 is an AI large language model (LLM) with 753 billion parameters, though it has only 40 billion parameters active at once—an optimization that improves the speed at which a model can respond. Z.ai released the model under an MIT open-source license, which means anyone can distribute, copy, modify, and use it.
GLM 5.2’s release added to fears that U.S. AI companies could lose their competitive edge. The model nearly ties Opus 4.8’s score on some agentic coding benchmarks, such as FrontierSWE and PostTrainBench. Cybersecurity researchers have also found that GLM 5.2 scores well in cybersecurity benchmarks, a capability that spurred comparisons to Anthropic’s Mythos.
Z.ai arrives amid a broader trend. According to Stanford’s AI Index (an annual, 300-plus-page survey of AI trends) Chinese companies produced just over half as many “notable” AI models in 2025 as their U.S. counterparts. That’s up from roughly a third in 2023, and a fifth in 2020.
GLM 5.2 caused hand-wringing among some U.S. observers due to its outstanding benchmark scores, which set new records for both open-weights models and Chinese-developed models generally. The model’s Chinese origin also complicates its use for U.S. and other companies wary of routing sensitive data through Chinese-linked infrastructure.
However, the model’s open weights provide an out. Any organization worried about where their data is being sent can instead host the model on their own hardware. This stands in contrast to most frontier-level models, which are gated behind an API with no self-hosting option.
Z.ai backed up GLM 5.2’s release with the company’s own numbers, publishing a research report the same day as GLM 5.2’s launch.
The report doesn’t mention Anthropic’s Mythos or Fable, which were announced but not yet publicly available at the time of its release.The report instead focuses on Anthropic’s Opus 4.8 and OpenAI’s GPT-5.5. And while GLM 5.2 often performs almost as well as Opus 4.8 in benchmarks, the report only claims a win in two less-difficult reasoning benchmarks—and none in coding.
Many of the report’s benchmarks place GLM 5.2 behind Opus 4.8 (and, at times, OpenAI’s GPT-5.5) in agentic coding. For example, GLM 5.2 completed just 13 percent of tasks in SWE-Marathon, a difficult long-duration agentic coding benchmark. Claude Opus 4.8 doubled GLM 5.2’s score in this benchmark. Opus 4.8 also notched wins of 10 percent or more in the coding benchmarks NL2Repo, DeepSWE, and Tool-Decathlon.
How do coders use GLM 5.2?
Software engineers who’ve pitted GLM 5.2 against their own workflows report a wide range of results.
“The main thing that I realized with [GLM 5.2], was that it can do more long-horizon tasks,” said Hasan, whose company hosts GLM 5.2 on North American infrastructure. Earlier open-weights models, he said, often lost the thread after around five to fifteen back-and-forth exchanges. “This one, I noticed that I could be using it for hours, and it would still have a coherent train of thought.”
David Nix, a principal software engineer at the Denver-based MetaRouter, puts LLMs to work at both his day job and for personal side projects. (Nix also operates a jobs board of AI engineers.) Nix said GLM 5.2 comes “really close” to frontier models like Anthropic’s Opus and OpenAI’s GPT-5.5—close enough to earn a permanent spot in his rotation.
“It’s pretty great at front-end development, for example, where I don’t need to always go to Opus or Fable for those things,” said Nix. He estimates that GLM 5.2 handles 10 to 20 percent of the work he sends to an LLM on a given day, and it’s now his first stop for some specific tasks, such as front-end design.
Others reported the same strength. Hasan said GLM 5.2 has “really good taste” in web design. Kacper Michalik, a software engineer at Kraków, Poland-based Screen Studio, received good results while using GLM 5.2 to create forms for use on a website.
On the other hand, Sai Kiran Myadaram, a software engineer at Bengaluru-based Indhic AI, reports less positive results with Z.ai. He signed up for Z.ai’s subscription plan the week GLM 5.2 launched and found the model burned through its token allotment quickly. “The weekly quota that Z.ai provides has been exhausted for me in less than two to three days,” he said. Michalik, who also accessed Z.ai directly, had no significant issues with the model’s quality but occasionally bumped into rate limits, though in his case he stuck to the free plan.
In addition to rate limits, Myadaram experienced problems with model hallucinations and over-planning when asked to tackle minor front-end fixes. “It’s messing up my code base,” said Myadaram. He’s since drifted back to OpenAI’s Codex.
- How Good Is ChatGPT at Coding, Really? ›
- How Coders Can Survive—and Thrive—in a ChatGPT World ›
- AI Copilots Are Changing How Coding Is Taught ›
Matthew S. Smith is a freelance consumer technology journalist with 17 years of experience and the former Lead Reviews Editor at Digital Trends. An IEEE Spectrum Contributing Editor, he covers consumer tech with a focus on display innovations, artificial intelligence, and augmented reality. A vintage computing enthusiast, Matthew covers retro computers and computer games on his YouTube channel, Computer Gaming Yesterday.
How it works
Once you click Generate, Ollama reads this article and crafts 5 comprehension questions. Your answers are graded against the article content — general knowledge won't be enough. Score 70+ to count toward your certificate.
Questions are cached — you'll always get the same 5 for this article.