GLM 5.2: why I’m replacing Opus in Claude Code with this new model
Episode
27 min
Read time
2 min
Topics
Productivity, Fundraising & VC, Design & UX
AI-Generated Summary
Key Takeaways
- ✓Model Setup via OpenRouter: To run GLM 5.2 in Cursor, add your OpenRouter API key to the OpenAI key field, override the base URL with `openrouter.ai/api/v1/cursor` (the `/cursor` suffix is undocumented but required), then add `z-ai/glm-5.2` as a custom model. Claude Code requires editing `~/.zshrc` and `~/.claude/settings.json` to reroute all model calls.
- ✓Cost Efficiency at Scale: A 45-minute autonomous coding session consuming roughly 6 million tokens cost $3.36 on OpenRouter, with a 72% cache hit rate. Comparable tasks using Claude Opus 4.8 or GPT-4.5 would cost significantly more. For high-volume coding workflows, switching to GLM 5.2 via a third-party inference provider can reduce API spend substantially.
- ✓Benchmark Positioning: On SWE-Bench Pro, GLM 5.2 scores near GPT-4.5 and approaches Claude Opus 4.8, while outperforming Gemini 2.1 Pro. This places it firmly in frontier-model territory for coding tasks, making it a credible drop-in replacement for expensive proprietary models in agentic software engineering pipelines.
- ✓Agentic Task Performance: GLM 5.2 successfully ran a 45-minute autonomous session pulling 72 hours of Sentry errors and Vercel logs, generating a prioritized bug-fix plan with 14 fixes, 2 P0 issues, and suggested sequencing. It struggled with React/TypeScript mid-session but self-corrected, indicating it handles long-horizon tasks with occasional intervention needed.
- ✓Model Constraints to Know: GLM 5.2 is text-only — no image input or output — which limits multimodal workflows. It supports a 1-million-token context window, function calling, MCP tool use, structured output, streaming, and reasoning/thinking mode. For pure coding and text-based agentic tasks, these constraints rarely surface as blockers in practice.
What It Covers
GLM 5.2, an open-weight model from Beijing-based Z.ai, is tested as a replacement for Claude Opus 4.8 inside Claude Code and Cursor. The episode benchmarks its coding, design, and autonomous agent capabilities against frontier models, with total API costs tracked at $3.36 for 6 million tokens via OpenRouter.
Key Questions Answered
- •Model Setup via OpenRouter: To run GLM 5.2 in Cursor, add your OpenRouter API key to the OpenAI key field, override the base URL with `openrouter.ai/api/v1/cursor` (the `/cursor` suffix is undocumented but required), then add `z-ai/glm-5.2` as a custom model. Claude Code requires editing `~/.zshrc` and `~/.claude/settings.json` to reroute all model calls.
- •Cost Efficiency at Scale: A 45-minute autonomous coding session consuming roughly 6 million tokens cost $3.36 on OpenRouter, with a 72% cache hit rate. Comparable tasks using Claude Opus 4.8 or GPT-4.5 would cost significantly more. For high-volume coding workflows, switching to GLM 5.2 via a third-party inference provider can reduce API spend substantially.
- •Benchmark Positioning: On SWE-Bench Pro, GLM 5.2 scores near GPT-4.5 and approaches Claude Opus 4.8, while outperforming Gemini 2.1 Pro. This places it firmly in frontier-model territory for coding tasks, making it a credible drop-in replacement for expensive proprietary models in agentic software engineering pipelines.
- •Agentic Task Performance: GLM 5.2 successfully ran a 45-minute autonomous session pulling 72 hours of Sentry errors and Vercel logs, generating a prioritized bug-fix plan with 14 fixes, 2 P0 issues, and suggested sequencing. It struggled with React/TypeScript mid-session but self-corrected, indicating it handles long-horizon tasks with occasional intervention needed.
- •Model Constraints to Know: GLM 5.2 is text-only — no image input or output — which limits multimodal workflows. It supports a 1-million-token context window, function calling, MCP tool use, structured output, streaming, and reasoning/thinking mode. For pure coding and text-based agentic tasks, these constraints rarely surface as blockers in practice.
Notable Moment
During a live autonomous run, the model stalled repeatedly while writing React and TypeScript, prompting frustration. Then, without intervention beyond a verbal complaint to the recording, it recovered, compiled cleanly, and delivered a well-structured dark-mode bug prioritization dashboard — reversing the apparent failure entirely.
Episode Transcript
What if I told you you could get opus level reasoning at a fraction of the cost? That's what we're gonna see and test today when I take a look at GLM 5.2. This is our first of many reviews of OpenWay and open source models to see if we should all be paying the tax to Anthropic and OpenAI or if we can run these models locally and get the same results. Let's dive in. This episode is brought to you by Mercury, banking redesigned from the ground up now with Command, so you can just say what you need and the work gets done. I've always liked products that reduce the distance between knowing what you wanna do and actually doing it. That's one reason I've been a Mercury customer for years. Whether it's sending money, managing cards, or checking in on the business, Mercury has always felt fast, simple, and built for founders. What I love about Mercury Command is that it takes that idea even further. Instead of navigating menus or figuring out where a feature lives, you just say what you need. Ask a question about your finances, create an invoice, categorize transactions, or send a payment, all from a conversation. Because command is built directly into Mercury, every answer comes from your actual account data, and every action follows the permissions and controls you've already set up. It feels like where software is less navigating and more simply telling a product what you want to accomplish. Visit mercury.com to learn more and apply online in minutes. Mercury is a fintech company, not an FDIC insured bank, banking services provided through Choice Okay. Before I get GLM 5.2 running against some benchmarks on my own computer, my own projects, I wanna talk you through what exactly this model is. So GLM stands for general language model, and this is a model that's put out by the Beijing based startup, z dot a I. So, yes, this is a Chinese trained model. Now this model is open weight. You may have heard that term before, but not exactly known what it means. And all it means is that the trained model weights are publicly available for download, which allows you to run it on your own hardware. You can fine tune that model on your own data, and you can inspect how it works. Now the licenses for open weight models kind of depends, so it doesn't necessarily mean you can use it, quote, unquote, for free. But why this matters for GLM 5.2 is you can self host this. So let's say you have one of those chunky Mac studios at home where you wanna run some models locally. You could potentially run GLM 5.2 locally. You can fine tune it, which means you can adapt it to your purpose. And then the thing that people really love about these open weight models is they're cheap. You can run your own inference, and so it …
Get the full transcript (4,768 words) + summary by email — free
One-time email with the complete transcript and AI summary of this episode. No account needed.
One email, no spam. We’ll also show you what SignalCast does.
You just read a 3-minute summary of a 24-minute episode.
Get How I AI summarized like this every Monday — plus up to 2 more podcasts, free.
Pick Your Podcasts — FreeKeep Reading
More from How I AI
Build an AI code review bot in 30 minutes with Vercel Eve
Aug 5 · 24 min
The AI Breakdown
Is Kimi K3 Really Fable Class?
Jul 17
More from How I AI
ChatGPT Codex Voice + browser + Sites: an expert’s AI workflow | Nick Baumann (OpenAI)
Aug 3 · 41 min
The AI Breakdown
Why AI Users Are Raving About GLM 5.2
Jun 22
Books, tools, and gear mentioned in this episode
SignalCast may earn commission on purchases via these links.
Tools
“SPONSORS: [Mercury]”
- GLM 5.2Recommended
by Z.ai
“GLM 5.2, an open-weight model from Beijing-based Z.ai, is tested as a replacement for Claude Opus 4.8 inside Claude Code and Cursor.”
by Anthropic
“GLM 5.2, an open-weight model from Beijing-based Z.ai, is tested as a replacement for Claude Opus 4.8 inside Claude Code and Cursor.”
“GLM 5.2, an open-weight model from Beijing-based Z.ai, is tested as a replacement for Claude Opus 4.8 inside Claude Code and Cursor.”
- OpenRouterRecommended
“To run GLM 5.2 in Cursor, add your OpenRouter API key to the OpenAI key field, override the base URL with `openrouter.ai/api/v1/cursor`.”
by Anthropic
“GLM 5.2, an open-weight model from Beijing-based Z.ai, is tested as a replacement for Claude Opus 4.8 inside Claude Code and Cursor.”
by Google
“On SWE-Bench Pro, GLM 5.2 scores near GPT-4.5 and approaches Claude Opus 4.8, while outperforming Gemini 2.1 Pro.”
More from How I AI
We summarize every new episode. Want them in your inbox?
Build an AI code review bot in 30 minutes with Vercel Eve
ChatGPT Codex Voice + browser + Sites: an expert’s AI workflow | Nick Baumann (OpenAI)
From zero coding background to hardware hacker: How Cursor + a Raspberry Pi makes AI fun
Claude Opus 5 review: this model is brilliant (but annoying)
Computer & browser use in Codex (5 real examples)
Similar Episodes
Related episodes from other podcasts
The AI Breakdown
Jul 17
Is Kimi K3 Really Fable Class?
The AI Breakdown
Jun 22
Why AI Users Are Raving About GLM 5.2
Cognitive Revolution
Jul 30
Is Offense or Defense Dominant? FAR.AI's Adam Gleave on the AI Security Leaderboard
The AI Breakdown
Jul 22
Wait... Just How Good IS GPT-6?
Software Engineering Daily
Jul 7
SED News: Restricted Models, IDE Wars, and the DeepMind Mafia
Explore Related Topics
This podcast is featured in Best AI Podcasts (2026) — ranked and reviewed with AI summaries.
You're clearly into How I AI.
Every Monday, we deliver AI summaries of the latest episodes from How I AI and 192+ other podcasts. Free for one show.
Start My Monday DigestNo credit card · Unsubscribe anytime