{"slug": "glm-5-2-lands-in-claude-code-1m-context-mit-weights-soon", "title": "GLM 5.2 Lands in Claude Code: 1M Context, MIT Weights Soon", "summary": "Z.ai released GLM 5.2 on June 13, offering a 1M-token context window and compatibility with Claude Code and other coding agents via an Anthropic-compatible API, coinciding with the shutdown of Anthropic's Fable 5 and Mythos 5 under US export controls. MIT-licensed open weights are expected the week of June 16, making GLM 5.2 a readily accessible frontier-tier coding model for developers.", "body_md": "Z.ai shipped GLM 5.2 on June 13 — the same day [Anthropic’s Fable 5 and Mythos 5 went offline](https://byteiota.com/fable-5-banned-us-gov-directive-and-your-claude-api-fix/) 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.\n\n## Plug Into Claude Code Today\n\nGLM 5.2 exposes an [Anthropic-compatible endpoint](https://docs.z.ai/guides/llm/glm-5), which means Claude Code users need exactly three changes to settings.json to start using it. Set both `ANTHROPIC_DEFAULT_SONNET_MODEL`\n\nand `ANTHROPIC_DEFAULT_OPUS_MODEL`\n\nto `glm-5.2[1m]`\n\n, and set `CLAUDE_CODE_AUTO_COMPACT_WINDOW`\n\nto `1000000`\n\n. Then run `/effort`\n\nin Claude Code and select Max for best coding performance. That is the entire migration.\n\n```\n{\n  \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"glm-5.2[1m]\",\n  \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"glm-5.2[1m]\",\n  \"CLAUDE_CODE_AUTO_COMPACT_WINDOW\": \"1000000\"\n}\n```\n\nBeyond 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`\n\nand 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.\n\n## What a 1M-Token Context Window Actually Means\n\nThe 1M-token context window — accessed via the model ID `glm-5.2[1m]`\n\n— 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.\n\nGLM-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.\n\n## No Benchmarks — What the History Tells Us\n\nZ.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.\n\nHowever, 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](https://www.digitalapplied.com/blog/glm-5-2-zai-flagship-coding-plan-release) (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](https://news.ycombinator.com/item?id=48518684) — 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.\n\nRelated:[Kimi K2.7-Code: Moonshot’s Open-Weight 1T Coding Agent]\n\n## GLM 5.2 MIT Weights Arrive Next Week\n\nThe 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.\n\nThe [Hacker News community](https://news.ycombinator.com/item?id=48518684) 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.\n\n## Key Takeaways\n\n- GLM 5.2 landed June 13 with an Anthropic-compatible API — Claude Code users need three settings.json changes to try it today\n- The 1M-token context window (model ID:\n`glm-5.2[1m]`\n\n) 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\n- MIT-licensed open weights arrive the week of June 16 — local deployment and data-residency workflows become viable then", "url": "https://wpnews.pro/news/glm-5-2-lands-in-claude-code-1m-context-mit-weights-soon", "canonical_source": "https://byteiota.com/glm-5-2-lands-in-claude-code-1m-context-mit-weights-soon/", "published_at": "2026-06-14 05:12:06+00:00", "updated_at": "2026-06-14 05:35:04.412873+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "ai-products", "developer-tools", "ai-agents"], "entities": ["Z.ai", "GLM 5.2", "Anthropic", "Claude Code", "Cline", "OpenCode", "Roo Code", "Goose"], "alternates": {"html": "https://wpnews.pro/news/glm-5-2-lands-in-claude-code-1m-context-mit-weights-soon", "markdown": "https://wpnews.pro/news/glm-5-2-lands-in-claude-code-1m-context-mit-weights-soon.md", "text": "https://wpnews.pro/news/glm-5-2-lands-in-claude-code-1m-context-mit-weights-soon.txt", "jsonld": "https://wpnews.pro/news/glm-5-2-lands-in-claude-code-1m-context-mit-weights-soon.jsonld"}}