Robots Atlas>ROBOTS ATLAS
GLM-5.2

GLM-5.2

5.2 · Family: GLM
Z.ai's flagship foundation model for the long-horizon task era - usable 1M context, native MCP support, SOTA open-source on Terminal-Bench 2.1 (81.0) and SWE-bench Pro (62.1). Matches Claude Opus 4.8 in coding.
✓ Active✓ Public access⚖ Open weightsFeaturedLLMReasoning modelTool-using model📁 GLM
Context window
1M
tokens
Parameters
not disclosed by Z.ai (successor to GLM-5's 744B/40B MoE)
parameters
Max output
128,000
tokens
Release date
1 April 2026
Access:APIDownloadHostedDeployment:☁ Cloud💻 Local

Overview

GLM-5.2 is Z.ai's flagship foundation model, purpose-built for the era of long-horizon tasks - tasks stretched over many hours of work, covering full engineering cycles from requirements to deployment. It is the direct successor to GLM-5.1 and the second model in the GLM-5 line, continuing Z.ai's positioning as the open-source leader in agentic software engineering. The model powers the z.ai homepage (since launch it carries the tagline 'Advanced AI Chatbot & Agent powered by GLM-5.2').

Key quality leap: usable 1M context (5x larger than GLM-5's 200K). Z.ai emphasises that the foundation of long-horizon tasks is not simply having a 1M window, but sustaining stable model performance across ultra-long context. GLM-5.2 underwent months of specialised training for large-scale Coding Agent scenarios - and in selected real-world benchmarks it even surpasses Claude Opus. Maximum output remains at 128K tokens, modalities: text-in / text-out.

New capabilities over GLM-5: native MCP (Model Context Protocol) support - flexible integration with external tool servers and data sources. The reasoning_effort parameter lets you tune reasoning depth (default 'max'). The model retains module boundaries, architectural constraints, API contracts, directory structures, and historical project decisions within a single reasoning workflow - critical for project-level codebase takeover.

Benchmarks (open-source SOTA): Terminal-Bench 2.1: 81.0 (leap from GLM-5.1's 62.0, only 4 points below Claude Opus 4.8's 85.0), SWE-bench Pro: 62.1 (up from GLM-5.1's 58.4), FrontierSWE: within 1% of Opus 4.8, outperforms GPT-5.5 and Opus 4.7 on multiple benchmarks. The model is the top-ranked open-source result across all three: FrontierSWE, PostTrainBench, SWE-Marathon. GLM Coding Plan developers (early access before release) reported especially: stronger project-level context capacity, more stable long-horizon task execution, better adherence to production-grade engineering standards (lint, tests, commit conventions), and stronger client-side and mobile engineering (Android Kotlin + ADB/logcat, WeChat Mini Programs, Remotion Code-to-Video).

Availability: API at api.z.ai (model name: glm-5.2, OpenAI-compatible format at api.z.ai/api/paas/v4/), chat at z.ai (main production model), open-weights for self-hosting. GLM Coding Plan Pro/Max subscription grants model access in Claude Code, Open Code, and other tools. SDKs: zai-sdk (Python), ai.z.openapi:zai-sdk (Java), plus OpenAI Python SDK support. Z.ai-documented use cases: project-level codebase takeover, long-horizon refactoring, production-grade standards stress test, mobile on-device debugging loop, WeChat Mini Program development, mini game development, research reproduction from paper to runnable code, code-to-video via Remotion.

Classification
LLMReasoning modelTool-using model
Family: GLM
Access & deployment
APIDownloadHosted
CloudLocal
Weights: Open weights
Key parameters
📏 Context: 1M
🧩 Parameters: not disclosed by Z.ai (successor to GLM-5's 744B/40B MoE)
Tools · ✓ Fine-tuning
📥 Input: text, structured data, documents

Technical specification

Context window
1M
tokens
Parameters
not disclosed by Z.ai (successor to GLM-5's 744B/40B MoE)
parameters
Max output tokens
128,000
tokens per response
Knowledge cutoff
1 Jan 2026
Knowledge boundary
License
Open weights (Z.ai / repozytorium open-source) - GLM Coding Plan Pro/Max wymagany do dostępu przez api.z.ai
Hardware requirements
Open-weight model - self-hosting on multi-GPU infrastructure (recommended min. 8-16x H100/H200 for 1M context handling with a GLM-5-scale 744B+ MoE, ~200GB+ VRAM after INT8 quantisation). Z.ai serves the model commercially via api.z.ai and ModelScope/HuggingFace integrations as the main production option.
Features:Tool useFine-tuning
Modalities
⬇ Input
textstructured_datadocuments
⬆ Output
textcodestructured_data

Capabilities and applications

Native model capabilities
Advanced reasoning
The ability to perform multi-step, structured reasoning: analysing problems, planning steps, and drawing conclusions from hypotheses. Reasoning-first models (e.g. GPT-5.1 Thinking) dedicate a portion of inference to chains of thought before responding.
Category: reasoning
Extended thinking mode
A reasoning-model variant with a larger inference budget: more thinking cycles, higher answer precision at the cost of response time. Choice between 'standard' and 'extended' thinking is left to the user (e.g. the selector in GPT-5.2 Pro).
Category: reasoning
Adaptive reasoning effort
The model decides how much 'thinking' to allocate to a given query: simple questions are answered quickly, complex problems receive more inference cycles. A GPT-5.1 feature (both Instant and Thinking) that shortens time on easy tasks and extends it for hard ones.
Category: reasoning
Multi-step reasoning
Carrying out multi-step chains of reasoning across long, complex tasks.
Category: reasoning
Mathematical reasoning
The model's ability to solve mathematical tasks requiring multi-step reasoning — equations, proofs, combinatorics, geometry, calculus and competition-level problems.
Category: reasoning
Coding
Generating, analysing and modifying code in many programming languages. Covers writing functions, debugging, refactoring, code review, and creating tests. Measured by benchmarks such as HumanEval and SWE-bench.
Category: coding
Agentic coding
Multi-hour, multi-step programming tasks performed autonomously by the model: cloning a repository, running tests, iterating on fixes, integrating with CLI tools. Characteristic of Codex variants (GPT-5.1-Codex-Mini, Codex-Max).
Category: coding
Agentic capability
The model's ability to autonomously plan and execute multi-step tasks by sequentially using tools, maintaining context, and adapting to intermediate results.
Category: planning
Tool use
The model's ability to call external functions, APIs and tools during a conversation: calculator, search engine, code editor, database. The model decides when and how to use a tool and interprets its result.
Category: planning
Long context
Support for large context windows — tens to hundreds of thousands (or millions) of input tokens. Enables analysis of entire codebases, long documents, and many parallel conversations without losing earlier information. GPT-5.1 supports 400,000 tokens.
Category: language
Prompt caching
Cost-performance optimisation: repeated prompt fragments (e.g. system prompt, long documentation) are cached server-side and cheaper in subsequent calls. Significantly reduces cost for applications with long contexts.
Category: other
Multilingual
Competence in many natural languages (from a few to over a hundred): understanding, generation, translation, and code-switching within a single conversation. Frontier models support a wide range of languages with comparable quality.
Category: language
MCP support
Native support for the Model Context Protocol - the model can integrate with external MCP servers, invoke their tools, and use their data sources without a dedicated wrapper.
Category: other

Benchmark results

5 benchmarks
Terminal-Bench 2.1
success rate · Leap from GLM-5.1's 62.0, 4 points below Claude Opus 4.8 (85.0), surpasses Gemini 3.1 Pro
81.0%
📅 1 Apr 2026📄 Z.ai GLM-5.2 docs (docs.z.ai/guides/llm/glm-5.2)
SWE-bench Pro
resolved rate · Up from GLM-5.1's 58.4 - strongest open-source model on the standard coding benchmark
62.1%
📅 1 Apr 2026📄 Z.ai GLM-5.2 docs
FrontierSWE
resolved rate · Frontier software engineering benchmark - GLM-5.2 remains the top-ranked open-source model, minimal gap to the closed-source frontier
within 1% of Opus 4.8%
📅 1 Apr 2026📄 Z.ai GLM-5.2 docs
PostTrainBench
task completion · Evaluation of post-training long-horizon task execution abilities
SOTA open-source%
📅 1 Apr 2026📄 Z.ai GLM-5.2 docs
SWE-Marathon
resolved rate · Very long SWE tasks (marathon), GLM-5.2 top-ranked open-source
SOTA open-source%
📅 1 Apr 2026📄 Z.ai GLM-5.2 docs

Pricing

Technical architecture

Deployment and security

🔒 Security / Enterprise
✓ Verified enterprise information

The model is hosted on Z.ai's infrastructure in China - subject to Cyberspace Administration of China AI regulations. Customers requiring data residency outside China have an alternative: self-hosting the open-weights (private cloud, on-premise, air-gapped). Open-source SDKs allow full integration audit. The model supports MCP - external data sources and tools can be attached under customer control.