Zhipu Launches and Open-Sources GLM-5.2, Focusing on Coding and Long-Horizon Tasks
Published · Jun 17 · Wed Source · 智谱 (CN)

Zhipu Launches and Open-Sources GLM-5.2, Focusing on Coding and Long-Horizon Tasks

Zhipu AI has launched and open-sourced the GLM-5.2 model, ranking first among globally available models in the Code Arena frontend evaluation. Designed specifically for long-horizon tasks, the model supports 1M lossless context and performs close to Claude Opus 4.8 on benchmarks like FrontierSWE. GLM-5.2 introduces effort level control, optimizes FLOPs through the IndexShare architecture, and natively supports domestic computing power such as Huawei Ascend.

KeywordsClaudeZhipuLaunchesOpen-SourcesGLM-5.2FocusingCodingLong-Horizon

Overview

GLM-5.2 is the flagship model for the era of long tasks. It supports truly usable 1M context, tested to handle project-level engineering context. Long-horizon task execution is more stable, engineering specification compliance is more reliable, and success rates in development scenarios are further improved. A complete development chain from "requirements to multi-end deployable products" can be completed in a single task.

Positioning

Flagship Base Model

Input Modality

Text

Output Modality

Text

Context Window

1M

Max Output Tokens

128K

Capability Support

Thinking Mode: Provides multiple thinking modes covering different task requirements.

Streaming Output: Supports real-time streaming responses to enhance user interaction experience.

Function Call: Powerful tool calling capabilities supporting integration with various external tools.

Context Cache: Intelligent caching mechanism optimizing long conversation performance.

Structured Output: Supports structured format output such as JSON for easy system integration.

MCP: Can flexibly call external MCP tools and data sources to expand application scenarios.

Recommended Scenarios

Project-level Engineering Takeover: Let the model understand an entire engineering project at once.

This is the starting move that best reflects the generational difference of GLM-5.2. It can continuously retain module boundaries, architecture constraints, interface contracts, directory structures, and historical decisions, significantly reducing the sense of context discontinuity in the latter half of long tasks. For complex projects, the key experience is: the model not only reads more but also brings the engineering judgments formed earlier into subsequent execution. Recommended experience method:

Select a real business repository, preferably containing backend, frontend or client, configuration, tests, documentation, and engineering specifications. First, let the model perform a technical inventory:

Please read the current project and output the system architecture map, core module responsibilities, key interface contracts, main data flows, core call chains, potential technical debt, and engineering constraints that must be followed during subsequent modifications.

Long-horizon Refactoring Execution: Hand over real modification tasks to it to run to the end.

GLM-5.2 is more stable in cross-file, multi-step, long-chain tasks. It will first break down goals, identify dependencies and risks, then implement, verify, and close out in phases. It is suitable for tasks requiring continuous progress such as test module decoupling, interface migration, directory governance, SDK adaptation, and cross-language refactoring. Recommended experience method:

Select a medium-sized modification task, define clear boundaries, and enable /goal mode:

Please complete the decoupling refactoring of the current module without changing business logic, interface signatures, and runtime results. First provide the execution plan, impact scope, risk boundaries, and verification methods. After completion, run necessary tests and output verification results.

Production-level Spec Stress Test: See if it can hold firm on R&D hard constraints.

GLM-5.2 has higher retention of engineering specifications, especially in long context and multi-round execution. It can better comply with code style, architecture boundaries, dependency constraints, build processes, test requirements, and commit boundaries, reducing risks such as out-of-bounds modifications, invalid dependencies, skipping verification, and unauthorized commits. Recommended experience method:

Hand over the team's real specifications to the model, such as lint rules, build commands, test requirements, commit specifications, and prohibited operation lists in CLAUDE.md or Agent.md. Then give it a real modification task:

Please strictly comply with the current repository engineering specifications. No new dependencies are allowed, no interface contracts are allowed to be modified, and no active commits are allowed. After modification, run build, lint, and tests, and explain the verification results and uncovered risks.

Mobile Device Debugging Loop: From code implementation to device verification.

In mobile scenarios, GLM-5.2 can cover client architecture, streaming messages, long connection status, local state management, keyboard behavior, scrolling logic, system notifications, permission mechanisms, and background recovery. More importantly, it can combine ADB, logcat, screenshots, and runtime logs to locate real-device issues, truly close to mobile engineering development practices. Recommended experience method:

Select a real Android or Mini Program task, let the model go from implementation to verification:

Please implement a native Android client using Kotlin, connecting to the existing server API, supporting multi-session, streaming messages, voice input, notifications, and reconnection after disconnection. After completion, use ADB to install on a real device and combine logcat and screenshots to complete debugging.

WeChat Mini Program Development: From Web application migration to WeChat Mini Program.

GLM-5.2 can handle page subpackages, custom components, page-level components, page stack management, wx.request encapsulation and interface layer adaptation, authentication and login state maintenance (wx.login + custom login state), application/page/component three-level lifecycle management, and exception states in Mini Program development. It is suitable for testing whether the model can reorganize existing Web pages, official websites, or backend capabilities into runnable engineering compliant with Mini Program platform specifications. Recommended experience method:

Select an existing Web project, specify the target technology stack (Native Mini Program / Taro / uni-app), and migrate all functions of the Web project into a Mini Program version:

Please migrate all functions of the current Web project into a WeChat Mini Program. Require using [Native/Taro/uni-app] technology stack. First analyze page structure, core user paths, backend interface contracts, and platform limitations (package size limit, domain whitelist, HTTPS requirements), then complete page, component, page jump, and data flow implementation. After completion, explain the running method, integrated interfaces, uncovered functions, and subsequent optimization points.

Mini-game Development: From gameplay rules to playable closed loop.

GLM-5.2 is suitable for testing rule understanding, state machine design, level structure, scoring logic, resource loading, interaction feedback, and settlement processes in mini-games. Compared to static pages, such tasks better reflect the model's understanding of complex states, user paths, and product completeness. Recommended experience method:

Give a complete but not overly detailed gameplay goal, let the model design rules first, then implement a runnable version:

Please develop a lightweight level-based mini-game. First design the core gameplay loop, state machine, level structure, scoring rules, failure and settlement logic, then implement basic functions such as start, pause, continue, settlement, restart, and local save. After completion, explain the project structure, verified functions, and next expansion directions.

Research Replication: From paper data to runnable engineering.

GLM-5.2 can write runnable code consistent with the paper from scratch based on the model architecture, loss functions, data pipelines, and training/inference scripts in the paper. It can set up the model structure correctly at once, maintain rule consistency across multiple files, and autonomously run through and fix code and environment issues—delivering engineering that can truly reproduce paper metrics, not just fragments. Recommended experience method:

Pick a paper with models and experiments (author open-sourced code or public metrics are better), hand over the paper and data to it, and see if it can write the model itself, run through, and align with paper metrics:

Please reproduce the experiment based on this paper and data. Complete implementation details not specified in the paper, build model structure and loss functions using PyTorch, construct data pipelines and training/inference scripts, ensuring it can run through and be consistent across multiple files. Autonomously locate and fix issues during runtime, check paper metrics item by item until aligned, and explain the reproduction path, key changes, and unaligned items.

Code-to-Video Loop: From natural language creativity to demonstrable finished film.

In Coding to Video scenarios, GLM-5.2 can use the Remotion framework—using React code (components, parameters, animation logic) to "programmatically" make videos and then render them into mp4, simply put "writing video as code"—covering complete capabilities such as natural language creativity translation, Remotion React code generation, and video rendering output, generating a runnable, demonstrable complete video through code driving. Recommended experience method:

Select a real video creativity task, let the model start from a sentence of natural language, and gradually complete a renderable, playable, and iterable video work:

Please create a new composition using Remotion, add a map, zoom out the camera from Los Angeles (LA) but always keep focus on it. After completion, draw a route animation from Los Angeles to New York (NY), and let the camera follow this line. Then add a stop to this journey, this time we go to Paris.

Detailed Introduction

1M Context: Making Long-Horizon Tasks Stable and Usable

The foundation of long-horizon tasks is not having 1M context, but making 1M context truly usable. GLM-5.2 achieves Solid 1M lossless context and has undergone months of reinforced training for long-horizon Coding Agent scenarios, covering high-value tasks such as large-scale implementation, automated research, and performance optimization. Compared to solutions that only expand context length, GLM-5.2 maintains more stable performance under ultra-long context, and even exceeds Opus in some real tests. (See technical blog for details) 1M context supports GLM-5.2's outstanding long-horizon delivery capability. On long-horizon task benchmarks such as FrontierSWE, SWE-Marathon, and PostTrainBench, GLM-5.2's overall performance is between Claude Opus 4.7 and 4.8, making it the highest-ranked open-source model currently. Among them, on FrontierSWE, it is only about 1% behind Opus 4.8, while exceeding GPT-5.5 (1%) and Opus 4.7 (11%); on the more challenging SWE-Marathon, there is still room for improvement, with a gap of about 13% compared to Opus 4.8. In actual experience, GLM-5.2 can autonomously complete task breakdown, architecture design, frontend and backend development, test repair, and deployment delivery, finally generating online-ready Web, mobile, and Mini Program applications. The entire process cumulatively processes over 850K tokens, close to fully using the 1M context window. Engineering that previously required team collaboration for weeks can now be completed in a single continuous long-horizon task.

Coding Capabilities Verified by Both Leaderboards and Developers

GLM-5.2 has made significant improvements in success rates in development scenarios such as frontend, backend, and long-horizon tasks compared to the previous generation GLM-5.1, with more stable complex system engineering and deep debugging. On mainstream programming benchmarks, GLM-5.2 maintains open-source SOTA, in a comparable range with Claude Opus 4.8. On Code Arena, a frontend development evaluation system with blind tests involving millions of global users, GLM-5.2 achieved the first performance among globally available models.

Before launch, GLM-5.2 was opened early to GLM Coding Plan users. The improvements perceived by developers are concentrated in the following points:

- Stronger project-level context carrying capacity, able to put the complete engineering into the same inference chain

- More stable long-horizon task execution, complex tasks can continue to advance, not easily deviating midway

- More reliable production-level engineering specification compliance, able to hold firm on hard constraints in team R&D processes

- More solid client and mobile engineering capabilities, not only writing Apps but also completing real-device debugging closed loops

Resources

Experience Center

Quickly test the model's effect in business scenarios

API Documentation

API calling methods

Call Examples

The following are complete call examples to help you get started with the GLM-5.2 model quickly.

- cURL

- Python

- Java

- Python (Old)

Basic Call Streaming Call.

This page provides an editorial summary based on publicly available information. It is not a republished article. Use the source link below for the original report.