How I AI

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

· Summarized

Share this episode
Anyone with this link can open it.
Share Link
Start at 0:00

Key takeaways

  • Open-weight models like GLM 5.2 allow self-hosting and fine-tuning, reducing costs and vendor lock-in.
  • GLM 5.2 performs competitively on benchmarks, providing reasoning, code understanding, and autonomous multi-step tasks.
  • Connecting GLM 5.2 via OpenRouter and tools like Cursor or Claude Code is straightforward with proper setup.
  • In practical demos, GLM 5.2 showed strong capabilities in codebase exploration, UI design, and autonomous error fixing, despite some struggles with React.
  • Cost analysis indicates that extensive use of GLM 5.2 is highly affordable, making it a compelling alternative to high-priced commercial models.
  • Open-weight models are a promising avenue for developers seeking customizable, cost-effective AI solutions that can match or surpass commercial offerings.

Summary

Introduction and Context of GLM 5.2

The episode opens with an exploration of GLM 5.2, a new open-weight model from z.ai, and discusses its potential to provide Opus-level reasoning capabilities at a lower cost and with local hosting options. The host emphasizes the importance of open-weight models for cost efficiency, vendor independence, and adaptability, setting the stage for an in-depth review of the model's capabilities.

What Is GLM 5.2 and Why It Matters

This section explains the technical background of GLM 5.2, a Chinese-trained open-weight general language model. Open-weight means the model's trained weights are publicly available, allowing users to run, fine-tune, and inspect the model locally or via cloud providers. This flexibility can greatly reduce inference costs compared to API-based models from Anthropic or OpenAI. The discussion highlights the significance of having competitive, open source options in the AI landscape, especially for coding tasks.

Benchmark Performance and Capabilities of GLM 5.2

The host reviews benchmark results, showing that GLM 5.2 approaches or exceeds certain performance metrics of well-known models like GPT 5.5 and Opus, especially in coding and reasoning tasks. It features a large context window of one million tokens and can perform reasoning, function calling, streaming outputs, and structured data handling. Its performance in benchmarks suggests it is a strong competitor in AI intelligence and coding problem-solving, making it a viable alternative to more expensive vendor models.

Connecting GLM 5.2 to Development Tools and Platforms

This practical section guides viewers on integrating GLM 5.2 with tools such as Cursor and Claude Code, using OpenRouter as a unified API interface. The host walks through the setup process, including API key configuration, URL overrides, and model selection, providing step-by-step instructions for developers to incorporate GLM 5.2 into their workflows.

Use Cases and Live Demos of GLM 5.2

Multiple demonstrations showcase GLM 5.2 in real-world scenarios: exploring a codebase to understand architecture, generating an HTML page for architecture and roadmap, redesigning a website header to match a design system, and handling a 45-minute autonomous bug-hunting task using logs from Sentry and Vercel. The model performs impressively in understanding and summarizing code, designing user interfaces, and managing long-running autonomous workflows, although it struggles a bit with writing React code.

Performance, Speed, and Cost Analysis

The host assesses GLM 5.2’s efficiency, including its running costs—around $3.36 for 6 million tokens—comparing favorably against higher-cost API models. It demonstrates that extensive tasks like bug fixing and design can be performed cost-effectively, encouraging viewers to consider local hosting and open weights as practical solutions for AI implementation in development.

Conclusion and Final Verdict

The episode concludes with a positive assessment of GLM 5.2, highlighting its strong performance and affordability. The host suggests that GLM 5.2 is suitable for front-end and long-running backend tasks, recommending further trials and exploration. The overall message emphasizes the potential of open-weight models to democratize access to powerful AI tools, fostering innovation and independence in AI workflows.

Sponsors

  • Mercury · Banking redesigned from the ground up, now with command. Say what you need and the work gets done. Mercury takes that idea further — ask questions about finances, create invoices, categorize transactions, or send payments from a conversation, all built into Mercury and respecting your permissions. Visit mercury.com to learn more and apply online in minutes.

Show notes

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.


What you’ll learn:

  1. What “open-weight” actually means and why it matters for cost and vendor independence
  2. How to connect GLM 5.2 to Cursor and Claude Code
  3. How it performs on codebase exploration and autonomous architecture summarization in a real production Next.js app
  4. Whether GLM 5.2 can match an existing design system
  5. How the model handles a 45-minute long-running autonomous task
  6. Where GLM 5.2 stumbled 
  7. The actual cost breakdown

—

Brought to you by:

Mercury—Radically different banking loved by over 300K entrepreneurs

—

In this episode, we cover:

(00:00) What open-weight models are and why GLM 5.2 is worth testing

(01:38) GLM 5.2 model overview

(04:02) Capabilities and benchmark results

(06:02) How to set up GLM 5.2 in Cursor

(08:37) How to set up GLM 5.2 in Claude Code

(11:04) Live test 1: codebase exploration and architecture audit on ChatPRD

(12:43) Live test 2: generating an HTML architecture and roadmap page

(16:37) Live test 3: redesigning the How I AI landing page in Cursor

(20:57) Live test 4: 45-minute autonomous task, pulling Sentry errors and Vercel logs

(22:35) Where it struggled

(23:49) My verdict on the output

(25:23) Cost breakdown

—

Tools referenced:

—

Other references:

—

Where to find Claire Vo:

ChatPRD: https://www.chatprd.ai/

Website: https://clairevo.com/

LinkedIn: https://www.linkedin.com/in/clairevo/

X: https://x.com/clairevo

—

Production and marketing by https://penname.co/. For inquiries about sponsoring the podcast, email jordan@penname.co.

Follow this show on AudioBrevity and new episodes get summarized for you. Create a free account

Couldn't load the audio. A blocker may be stopping the show's tracking links. Open the file