Claude Code isn’t locked to Claude. GLM 5.2 inside it is wild.
GLM 5.2 from Z.ai (formerly Zhipu AI) is the open-weight model now running as a drop-in inside Claude Code. Same CLI. Same slash commands. Same agent loop. A different model behind the wheel.
The setup: Claude Code accepts any Anthropic-compatible API endpoint. Point `ANTHROPIC_BASE_URL` at GLM’s API, set the auth token, and the entire tool runs on the new model. No fork. No rebuild.
GLM 5.2 is open-weight and priced for high-volume usage. In real coding sessions inside the agent loop, it holds up against frontier models, at a fraction of what you’d pay routing through Anthropic’s API.
Three things stand out:
– It just works. No patches, no plugin layer.
– Performance looks competitive on coding benchmarks.
– Cost per session drops dramatically for builders running long threads.
The bigger takeaway: the agent layer is becoming model-agnostic.
Claude Code, Cursor, Cline, Aider. They’re all shifting toward “model is a config, not a commitment.” The orchestration is the moat. The model is becoming a swappable part.
If you’ve been writing off open-weight models for serious coding work, this is the moment to revisit.
What model would YOU swap into Claude Code if cost weren’t a concern? Drop it in the comments.
#AI #ClaudeCode #OpenSource #LLM #Automation #DevTools #Coding #ModelAgnostic #AIAgents #BuildInPublic #IndieHackers #SoftwareEngineering #DeveloperTools
Video Source
