{"slug": "glm-5-2-why-im-replacing-opus-in-claude-code-with-this-new-model", "title": "GLM 5.2: why I’m replacing Opus in Claude Code with this new model", "summary": "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.", "body_md": "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.\n\n**Listen or watch on YouTube, Spotify, or Apple Podcasts**\n\n### What you’ll learn:\n\nWhat “open-weight” actually means and why it matters for cost and vendor independence\n\nHow to connect GLM 5.2 to Cursor and Claude Code\n\nHow it performs on codebase exploration and autonomous architecture summarization in a real production Next.js app\n\nWhether GLM 5.2 can match an existing design system\n\nHow the model handles a 45-minute long-running autonomous task\n\nWhere GLM 5.2 stumbled\n\nThe actual cost breakdown\n\n### Brought to you by:\n\n** Mercury**—Radically different banking loved by over 300K entrepreneurs\n\n### In this episode, we cover:\n\n([00:00](https://www.youtube.com/watch?v=ZoBfQZ5utQk)) What open-weight models are and why GLM 5.2 is worth testing\n\n([01:38](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=98s)) GLM 5.2 model overview\n\n([04:02](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=242s)) Capabilities and benchmark results\n\n([06:02](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=362s)) How to set up GLM 5.2 in Cursor\n\n([08:37](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=517s)) How to set up GLM 5.2 in Claude Code\n\n([11:04](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=664s)) Live test 1: codebase exploration and architecture audit on ChatPRD\n\n([12:43](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=763s)) Live test 2: generating an HTML architecture and roadmap page\n\n([16:37](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=997s)) Live test 3: redesigning the How I AI landing page in Cursor\n\n([20:57](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=1257s)) Live test 4: 45-minute autonomous task, pulling Sentry errors and Vercel logs\n\n([22:35](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=1355s)) Where it struggled\n\n([23:49](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=1429s)) My verdict on the output\n\n([25:23](https://www.youtube.com/watch?v=ZoBfQZ5utQk&t=1523s)) Cost breakdown\n\n### Tools referenced:\n\nz.ai:\n\n[https://z.ai](https://z.ai)GLM 5.2:\n\n[https://z.ai/blog/glm-5.2](https://z.ai/blog/glm-5.2)OpenRouter:\n\n[https://openrouter.ai](https://openrouter.ai)Cursor:\n\n[https://cursor.com](https://cursor.com)Claude Code:\n\n[https://docs.anthropic.com/en/docs/claude-code](https://docs.anthropic.com/en/docs/claude-code)Sentry:\n\n[https://sentry.io](https://sentry.io)Vercel:\n\n[https://vercel.com](https://vercel.com)\n\n### Other references:\n\nSWE-Bench Pro leaderboard (coding benchmark scores referenced in episode):\n\n[https://www.swebench.com](https://www.swebench.com)Frontier Suite and Post-Train Bench (additional benchmarks cited):\n\n[https://scale.com/leaderboard](https://scale.com/leaderboard)Use Claude Code with OpenRouter:\n\n[https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration](https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration)\n\n### Where to find Claire Vo:\n\nChatPRD: [https://www.chatprd.ai/](https://www.chatprd.ai/)\n\nWebsite: [https://clairevo.com/](https://clairevo.com/)\n\nLinkedIn: [https://www.linkedin.com/in/clairevo/](https://www.linkedin.com/in/clairevo/)\n\nProduction and marketing by [https://penname.co/](https://penname.co/). For inquiries about sponsoring the podcast, email [[email protected]](/cdn-cgi/l/email-protection).", "url": "https://wpnews.pro/news/glm-5-2-why-im-replacing-opus-in-claude-code-with-this-new-model", "canonical_source": "https://www.lennysnewsletter.com/p/glm-52-why-im-replacing-opus-in-claude", "published_at": "2026-06-24 12:03:52+00:00", "updated_at": "2026-06-24 12:16:16.429635+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "ai-products", "ai-research", "developer-tools"], "entities": ["Z.AI", "GLM 5.2", "Claude Code", "Cursor", "Sentry", "Vercel", "OpenRouter", "ChatPRD"], "alternates": {"html": "https://wpnews.pro/news/glm-5-2-why-im-replacing-opus-in-claude-code-with-this-new-model", "markdown": "https://wpnews.pro/news/glm-5-2-why-im-replacing-opus-in-claude-code-with-this-new-model.md", "text": "https://wpnews.pro/news/glm-5-2-why-im-replacing-opus-in-claude-code-with-this-new-model.txt", "jsonld": "https://wpnews.pro/news/glm-5-2-why-im-replacing-opus-in-claude-code-with-this-new-model.jsonld"}}