GLM-5.1 is a next-generation flagship model for agentic engineering with significantly stronger coding capabilities. It achieves state-of-the-art performance on SWE-Bench Pro and excels at repo generation and real-world terminal tasks. Unlike previous models that plateau quickly, GLM-5.1 sustains optimization over hundreds of rounds and thousands of tool calls.
Quick Reference
Property
Value
Model ID
z-ai/glm-5.1
Context window
200,000 tokens
Max output
8,192 tokens
Streaming
✓
Function calling
✓
Structured output
✓
Batch API
✓
Pricing
Type
Price
Input
$0.12 / 1M tokens / 1M tokens
Output
$0.48 / 1M tokens / 1M tokens
Strengths
Agentic engineering — State-of-the-art on SWE-Bench Pro
Code generation — Significantly stronger coding and repo generation
Chinese language — Outstanding Chinese understanding and generation
Iterative reasoning — Sustains optimization over hundreds of rounds