← Hacker News

Claude Code Uses GLM 4.7

Hacker News · iamskeole · April 27, 2026

Detailed Analysis

Z.AI has configured its terminal-based agentic coding tool, Claude Code, to run on GLM-4.7 as its default backend model through a setup it calls the "GLM Coding Plan." The configuration works by mapping GLM models to Claude's native model name variables: both `ANTHROPIC_DEFAULT_OPUS_MODEL` and `ANTHROPIC_DEFAULT_SONNET_MODEL` resolve to GLM-4.7, while the lighter `ANTHROPIC_DEFAULT_HAIKU_MODEL` maps to GLM-4.5-Air. Developers access this stack by obtaining a Z.AI API key from the platform's Open Portal, then either manually editing environment variables or running Z.AI's automated Coding Tool Helper to inject the GLM Coding Plan into Claude Code's configuration layer. The resulting tool supports natural language commands for codebase analysis, git workflows, feature additions, and full-stack build tasks, with model mappings stored in `~/.claude/settings.json` and defaulting automatically to the latest available GLM versions when custom overrides are removed.

Early user reports and informal benchmarks paint a largely favorable picture of the integration's practical performance. Developers working on front-end and full-stack projects describe the combination as dramatically cost-effective, with one frequently cited characterization calling it an "insanely cheap coding combo." In one documented test, the Claude Code and GLM-4.7 stack completed a multi-page website built with Astro and Tailwind CSS in approximately eleven minutes with zero reported errors. Head-to-head comparisons against Factory AI Droid favored the GLM-4.7 integration in both speed and accuracy for complex project workflows. Users note that performance approaches — though does not consistently match — frontier models like Claude Sonnet 4.5 or Gemini 3 Pro, with results varying meaningfully depending on task complexity and codebase structure.

The broader significance of this development lies in what it reveals about the architecture of agentic coding tools and the increasingly modular nature of AI model deployment. Claude Code's interface and agentic scaffolding were built around Anthropic's model ecosystem, but Z.AI's implementation demonstrates that the underlying model layer is substantially interchangeable when environment variables are remapped correctly. GLM-4.7, developed by Zhipu AI and distributed as an open-weight model, can slot into infrastructure originally designed for proprietary Anthropic models, inheriting the full agentic loop — sub-agent spawning, web search, document reading, and API integration — without modification to the tooling layer itself. This portability is a direct consequence of the standardization of model-name environment variables across the Claude Code codebase.

This trend reflects a wider pattern in the AI development landscape where the frontier model providers — Anthropic, Google, OpenAI — are increasingly building ecosystems with enough abstraction that competitive or open-weight models can be substituted beneath the surface. For enterprises and individual developers sensitive to inference costs, the ability to run a capable open-weight model through a polished agentic interface like Claude Code materially lowers the barrier to sustained, all-day AI-assisted development. Z.AI's GLM Coding Plan effectively commoditizes the orchestration layer, separating the value of Anthropic's tooling design from the recurring cost of Anthropic's model inference. Whether this dynamic ultimately pressures frontier labs to compete more aggressively on price, or accelerates investment in capabilities that open-weight models cannot easily replicate, represents one of the central strategic questions now facing the commercial AI industry.

Read original article →