cd /news/large-language-models/glm-5-2-why-im-replacing-opus-in-cla… · home topics large-language-models article
[ARTICLE · art-37678] src=lennysnewsletter.com ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

GLM 5.2: why I’m replacing Opus in Claude Code with this new model

GLM 5.2, an open-weight coding model from Z.AI, outperformed Claude Opus in four real-world coding tasks including a codebase audit, UI redesign, and autonomous bug hunting, costing only $3.36 for 6 million tokens. The model matched a design system on the first try and produced shippable results, though it struggled in some areas. The test suggests GLM 5.2 is a viable, cost-effective alternative for developers seeking vendor independence.

read2 min views8 publishedJun 24, 2026
GLM 5.2: why I’m replacing Opus in Claude Code with this new model
Image: Lennysnewsletter (auto-discovered)

I put GLM 5.2, the open-weight coding model from Z.AI, through four real tasks inside my actual codebase: a codebase architecture audit, a UI redesign, and a 45-minute autonomous bug-hunting session pulling from Sentry and Vercel logs. Total cost: $3.36 for roughly 6 million tokens, a prioritized bug-fix dashboard I’m actually shipping from, and a landing page redesign that matched Chat PRD’s design system on the first try.

Listen or watch on YouTube, Spotify, or Apple Podcasts

What you’ll learn:

What “open-weight” actually means and why it matters for cost and vendor independence

How to connect GLM 5.2 to Cursor and Claude Code

How it performs on codebase exploration and autonomous architecture summarization in a real production Next.js app

Whether GLM 5.2 can match an existing design system

How the model handles a 45-minute long-running autonomous task

Where GLM 5.2 stumbled

The actual cost breakdown

Brought to you by:

** Mercury**—Radically different banking loved by over 300K entrepreneurs

In this episode, we cover:

([00:00](https://www.youtube.com/watch?v=ZoBfQZ5utQk)) What open-weight models are and why GLM 5.2 is worth testing

([01:38](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=98s)) GLM 5.2 model overview

([04:02](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=242s)) Capabilities and benchmark results

([06:02](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=362s)) How to set up GLM 5.2 in Cursor

([08:37](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=517s)) How to set up GLM 5.2 in Claude Code

([11:04](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=664s)) Live test 1: codebase exploration and architecture audit on ChatPRD

([12:43](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=763s)) Live test 2: generating an HTML architecture and roadmap page

([16:37](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=997s)) Live test 3: redesigning the How I AI landing page in Cursor

([20:57](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=1257s)) Live test 4: 45-minute autonomous task, pulling Sentry errors and Vercel logs

([22:35](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=1355s)) Where it struggled

([23:49](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=1429s)) My verdict on the output

([25:23](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=1523s)) Cost breakdown

Tools referenced:

z.ai:

[https://z.ai](https://z.ai)GLM 5.2:

[https://z.ai/blog/glm-5.2](https://z.ai/blog/glm-5.2)OpenRouter:

[https://openrouter.ai](https://openrouter.ai)Cursor:

[https://cursor.com](https://cursor.com)Claude Code:

[https://docs.anthropic.com/en/docs/claude-code](https://docs.anthropic.com/en/docs/claude-code)Sentry:

[https://sentry.io](https://sentry.io)Vercel:

[https://vercel.com](https://vercel.com)

Other references:

SWE-Bench Pro leaderboard (coding benchmark scores referenced in episode):

[https://www.swebench.com](https://www.swebench.com)Frontier Suite and Post-Train Bench (additional benchmarks cited):

[https://scale.com/leaderboard](https://scale.com/leaderboard)Use Claude Code with OpenRouter:

[https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration](https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration)

Where to find Claire Vo:

ChatPRD: [https://www.chatprd.ai/](https://www.chatprd.ai/)

Website: [https://clairevo.com/](https://clairevo.com/)

LinkedIn: [https://www.linkedin.com/in/clairevo/](https://www.linkedin.com/in/clairevo/)

Production and marketing by [https://penname.co/](https://penname.co/). For inquiries about sponsoring the podcast, email [[email protected]](/cdn-cgi/l/email-protection).
── more in #large-language-models 4 stories · sorted by recency
── more on @z.ai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/glm-5-2-why-im-repla…] indexed:0 read:2min 2026-06-24 ·