NewsAI & Development

GLM 5.2 Lands in Claude Code: 1M Context, MIT Weights Soon

Bold conceptual design showing GLM 5.2 circular badge with orbiting coding agent icons on white background

Z.ai shipped GLM 5.2 on June 13 — the same day Anthropic’s Fable 5 and Mythos 5 went offline under a US export control order — and landed a 1M-token context window directly into Claude Code, Cline, OpenCode, and five other coding agents via an Anthropic-compatible API. The timing was not subtle. Developers who woke up to broken Fable API calls suddenly had a drop-in alternative that works with the tools they already use. MIT-licensed open weights are expected the week of June 16, making GLM 5.2 the most immediately accessible frontier-tier coding model available right now.

Plug Into Claude Code Today

GLM 5.2 exposes an Anthropic-compatible endpoint, which means Claude Code users need exactly three changes to settings.json to start using it. Set both ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_OPUS_MODEL to glm-5.2[1m], and set CLAUDE_CODE_AUTO_COMPACT_WINDOW to 1000000. Then run /effort in Claude Code and select Max for best coding performance. That is the entire migration.

{
  "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.2[1m]",
  "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.2[1m]",
  "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000"
}

Beyond Claude Code, day-one compatibility extends to Cline, OpenCode, Roo Code, Goose, Crush, OpenClaw, and Kilo Code. For Cline, point the base URL to https://api.z.ai/api/coding/paas/v4 and set the context window to 1,000,000. The zero migration overhead is the most practically significant thing about this release — Z.ai built for the existing developer ecosystem rather than demanding a new workflow.

What a 1M-Token Context Window Actually Means

The 1M-token context window — accessed via the model ID glm-5.2[1m] — holds an entire mid-sized codebase in working memory: source files, tests, configuration, and conversation history all at once. Maximum output is 131,072 tokens per response, roughly five times GLM-5.1’s limit. In practice, that means generating large refactored files or full test suites without truncation.

GLM-5.1, the predecessor, demonstrated eight-hour autonomous coding sessions with up to 1,700 agent steps. The expanded context eliminates the constant summarization cycles that break long agentic tasks — the agent stops losing state mid-refactor. For comparison, most competing models cap at 128K to 200K context. Going from 200K to 1M is not a marginal improvement; it is the difference between a model that keeps context through a large feature and one that forgets it.

No Benchmarks — What the History Tells Us

Z.ai launched GLM 5.2 with zero official benchmark scores. No SWE-bench Verified, no LiveCodeBench, no HumanEval. The company says it is “superior to prior GLM versions on long-horizon coding” without providing numbers to support the claim. One independent reviewer called it “a marketing-first move.” That characterization is fair.

However, the GLM series has a track record worth considering. GLM-5 scored 77.8% on SWE-bench Verified. GLM-5.1 hit 1,530 Elo on Code Arena (third globally) and 58.4% on SWE-bench Pro, slightly edging Claude Opus 4.6’s 57.3%. One developer in the Hacker News thread — which crossed 443 points within 24 hours — put it plainly: “About six months behind the frontier labs. Very similar to Opus in January. Pretty damn impressive and very useable.” That is a reasonable calibration. Treat GLM 5.2 as promising but verify it on your own task distribution before switching production workflows.

Related: Kimi K2.7-Code: Moonshot’s Open-Weight 1T Coding Agent

GLM 5.2 MIT Weights Arrive Next Week

The standalone API, Z.ai chatbot, and MIT-licensed weights are all expected the week of June 16. The license shift from GLM-5’s Apache-2.0 to MIT is notably permissive for a model at this capability tier. For teams that need data residency, want to avoid quota-based access, or are rethinking reliance on any single commercial provider after this week’s disruptions, local deployment becomes the real argument for GLM 5.2.

The Hacker News community made the point directly: open weight models are immune to government restriction scenarios. That is not a knock on any particular lab — it is a practical observation about model availability resilience. When the weights are yours, no export order takes them offline.

Key Takeaways

  • GLM 5.2 landed June 13 with an Anthropic-compatible API — Claude Code users need three settings.json changes to try it today
  • The 1M-token context window (model ID: glm-5.2[1m]) enables repository-scale agentic coding without summarization interruptions
  • No benchmarks were published at launch — GLM-5.1’s track record (1,530 Elo Code Arena, 58.4% SWE-bench Pro) is the best available signal
  • MIT-licensed open weights arrive the week of June 16 — local deployment and data-residency workflows become viable then
ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News