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 US $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 price tag 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 companies in the U.S. and elsewhere that are wary of routing sensitive data through Chinese-linked infrastructure.
However, the model’s open weights provide an out. Any organization worried about where its data is being sent can instead host the model on its 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 claims a win only 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 5 to 15 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, India–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 overplanning 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.
Facts Only
* Zain Hasan uses a frontier model (e.g., Anthropic’s Fable) for difficult problems.
* Hasan directs straightforward tasks to a less capable and cheaper language model, GLM 5.2.
* GLM 5.2 was released by Z.ai on June 16.
* GLM 5.2 is an open-weights model under an MIT license.
* Z.ai’s API costs $4.40 per million output tokens.
* This cost is less than one-fifth the price for Anthropic’s Opus 4.8 access and one-tenth the price for Anthropic’s Fable coding model access.
* GLM 5.2 has 753 billion parameters, with 40 billion active at once.
* GLM 5.2 nearly ties Opus 4.8 on some agentic coding benchmarks like FrontierSWE and PostTrainBench.
* GLM 5.2 scored well in cybersecurity benchmarks, comparing to Anthropic’s Mythos.
* GLM 5.2 completed only 13 percent of tasks in the SWE-Marathon benchmark.
* Some engineers report GLM 5.2 handles long-horizon tasks coherently over hours.
* One engineer experienced token allotment exhaustion in less than three days when using Z.ai's quota.
Executive Summary
AI engineers are exploring cost-saving strategies when using AI coding assistants, directing tasks to different language models based on complexity and expense. Zain Hasan uses a frontier model like Anthropic’s Fable for difficult problems and a cheaper, open-weights model like GLM 5.2 for simpler tasks. GLM 5.2 is available under an open-source license, allowing for free self-hosting. Z.ai charges $4.40 per million output tokens, which is significantly less expensive than access to models like Anthropic’s Opus or Fable.
The cost dynamic has prompted some software engineers to prioritize using the most powerful model, operating under the assumption that a token budget is not yet standardized in the industry. However, practical experiences vary; while some users find GLM 5.2 excellent for long-horizon tasks and front-end development, others encountered issues with rate limits, hallucinations, and overplanning when using it for minor fixes, leading them to revert to other models like OpenAI’s Codex.
The release of GLM 5.2, which nearly matched benchmark scores for some U.S. counterparts in agentic coding, has sparked concern among U.S. AI observers regarding the competitive edge of U.S. labs. Despite these concerns stemming partly from the model's Chinese origin, the open-weights nature of GLM 5.2 offers an alternative to proprietary API access by allowing organizations to self-host the model on their own infrastructure, contrasting with gated frontier models.
Full Take
The narrative establishes a tension between optimizing for performance (using frontier models) and optimizing for cost (using open, cheaper models). This dynamic suggests that perceived capability, measured by benchmark scores, is currently prioritized over the aggregate financial reality of AI usage, especially within corporate environments where token budgeting is undefined. The shift toward open-weights models like GLM 5.2 challenges the proprietary gatekeeping of frontier research by providing an infrastructure alternative—self-hosting—which mitigates geopolitical risks associated with reliance on foreign infrastructure for sensitive data.
The discrepancy between objective benchmark performance and practical, real-world coding efficacy highlights a gap in current evaluation methods; while models may score highly on abstract reasoning tasks, their utility in complex, multi-step software development remains subject to unpredictable failures like hallucinations or overplanning during specific task execution. This suggests that the "moat" currently protecting U.S. AI labs is less about raw benchmark supremacy and more about the control provided by proprietary API access for cutting-edge capabilities.
The varying user experiences with GLM 5.2—from extended coherence on long tasks to specific failures in code-fixing—reveal that model choice is not a simple linear function of capability but involves an emergent trade-off between model architecture, deployment environment, and the specific constraints of the engineering workflow. The pattern suggests that as accessible, powerful open models enter the arena, the focus will shift from establishing absolute performance dominance to developing sophisticated meta-strategies for cost, security, and reliability within heterogeneous LLM ecosystems. What are the unstated costs borne by organizations when this flexibility is introduced?
Sentinel — Human
The text reads as a synthesized analysis blending specific user experiences with industry benchmarks and geopolitical context, suggesting human editorial oversight applied to technical reporting.
