glm / 5.2
5.2
GLM 5.2 is a text-only MoE model with a usable 1M-token context for long-horizon coding and agent workflows. It supports thinking effort and tool calling.
Overview
GLM 5.2 is a text-only large language model made by Z.ai in the GLM family. It uses a mixture-of-experts design, so a small set of experts activates per token. It can keep up to 1,000,000 tokens of context and generate up to 128,000 output tokens in one run. It’s built for long-horizon coding and agent tasks where the model must keep many files, rules, and decisions consistent.
What you can build
- Full-repo architecture audits that map modules, APIs, and data flows
- Long-horizon refactors across many files while keeping strict constraints
- Coding agents that plan steps, call tools, and recover from errors
- Migration guides (API v1 to v2, framework upgrades, directory restructures)
- Structured extraction to JSON for tickets, changelogs, incident reports, and specs
- Test generation plans and failure triage from large log dumps
Inputs
- Your request as plain text. This model does not take image, video, or audio input.
- Optional user and session identifiers, so Wiro can keep chat history across turns.
- Optional system-level instructions that apply at the start of a session.
- A thinking toggle that can enable or disable internal reasoning for the response.
- A reasoning effort level that controls how deep the model thinks before it answers.
- Randomness controls for generation, including a temperature value in the 0 to 1 range.
- Nucleus sampling control (top-p) in the 0.01 to 1 range.
- Optional repetition and topic-shift controls that can discourage loops or force novelty.
- A maximum response length. Requests above the model’s cap will be truncated.
Outputs
The model returns a text response for the assistant turn. For tool-driven workflows, it can emit structured tool-call requests that your app can execute. It can also produce structured JSON when you ask for a strict schema in your instructions. Many runtimes also report token usage metadata for prompt and completion tokens.
Recommended settings
- For benchmark-style reasoning setups reported by the publisher, use temperature 1.0 and top-p 0.95.
- For hard multi-step tasks, keep thinking enabled and choose a higher reasoning effort.
- For quick short replies, disable thinking to keep the response focused and shorter.
- When tuning sampling, change either temperature or top-p first, not both at once.
Limitations
- Text-only input. If your workflow depends on images, video, or audio, use a multimodal GLM model instead.
- Maximum output is 128K tokens per response. Long deliverables may need multiple turns.
- Thinking can consume output tokens even when the reasoning text is not shown.
- Very long prompts can still hurt accuracy. The model may miss details in noisy context.
- Low-quality inputs can degrade results. This includes minified code, unstructured logs, OCR text, and inconsistent file dumps.
- Tool calling can be brittle in long runs. Validate tool arguments before execution.
Safety & compliance
Follow all applicable laws and local policy requirements where you operate. Don’t use model outputs as the sole basis for high-stakes decisions in areas like healthcare, finance, insurance, employment, housing, or legal matters. Respect intellectual property rights when you provide prompts and when you publish generated outputs. If your app exposes outputs to end users, add your own safeguards for harmful or illegal content and provide a way to report abuse.
API quick start
Run 5.2 with a single API call.
{
"prompt": "Tell me about Türkiye",
"user_id": "...",
"session_id": "...",
"systemInstructions": "..."
}