AI Coding Assistant Strategy Slashes Token Bills

AI Coding Assistant Strategy Slashes Token Bills

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…

Read full article: AI Coding Assistant Strategy Slashes Token Bills

The post “AI Coding Assistant Strategy Slashes Token Bills” by Matthew S. Smith was published on 07/21/2026 by spectrum.ieee.org