GLM 5.1 and GLM 5: Z.ai's agentic models, their scores, and a call on a private API
The Morse teamPublished Facts checked 3 min read
GLM 5.1 is Z.ai's open-weight model for what it calls "agentic engineering": long coding and tool-use sessions where the model has to stay on track for many steps. On Z.ai's own table it clearly beats GLM 5 on coding and security tasks. Morse serves it on a private, OpenAI-compatible API as z-ai/glm-5.1, at $1.40 per million input tokens and $4.40 per million output tokens.
We read Z.ai's GLM-5.1 card and Morse's model page on December 3, 2026. Scores are Z.ai's.
What is GLM 5.1?
The card describes "our next-generation flagship model for agentic engineering, with significantly stronger coding capabilities than its predecessor," built "to stay effective on agentic tasks over much longer horizons." It keeps GLM 5's sparse-attention Mixture of Experts design; Hugging Face lists 754 billion parameters, under MIT.
Where did GLM 5 start?
GLM 5 is the base of the generation. Its card says it "scales from 355B parameters (32B active) to 744B parameters (40B active), and increases pre-training data from 23T to 28.5T tokens," compared with GLM 4.5. It added DeepSeek Sparse Attention for long inputs, and an asynchronous reinforcement-learning system Z.ai calls slime for post-training. Against GLM 4.7, the tool-heavy tests moved most:
| Benchmark | GLM 5 | GLM 4.7 |
|---|---|---|
| SWE-bench Verified | 77.8 | 73.8 |
| Terminal-Bench 2.0 (Terminus 2) | 56.2 | 41.0 |
| MCP-Atlas (public) | 67.8 | 52.0 |
| Tool-Decathlon | 38.0 | 23.8 |
| CyberGym | 43.2 | 23.5 |
Source: GLM-5 model card, read December 3, 2026. MCP-Atlas, which tests using tools through the Model Context Protocol, rose almost 16 points. Z.ai also ran a business simulation, Vending Bench 2, where GLM 5 finished with roughly twice GLM 4.7's balance.
How does GLM 5.1 compare with GLM 5?
Z.ai's table sets the two side by side:
| Benchmark | GLM 5.1 | GLM 5 |
|---|---|---|
| SWE-Bench Pro | 58.4 | 55.1 |
| NL2Repo | 42.7 | 35.9 |
| Terminal-Bench 2.0 (Terminus-2) | 63.5 | 56.2 |
| CyberGym | 68.7 | 48.3 |
| BrowseComp | 68.0 | 62.0 |
| MCP-Atlas (public) | 71.8 | 69.2 |
| Tool-Decathlon | 40.7 | 38.0 |
| HLE, with tools | 52.3 | 50.4 |
Source: GLM-5.1 model card, read December 3, 2026.
The largest gain is CyberGym, a security benchmark of reproducing real vulnerabilities, up 20 points. Coding in a terminal and building whole repositories from a spec both improve by around 7. On math and science (AIME, GPQA) the two are within a point, so 5.1's work went into acting, not answering. That makes it a better fit for agents than for quick question-and-answer use, where GLM 5 does about as well.
How do you call GLM 5.1?
Point any OpenAI client at https://inference.trymorse.ai/v1, pass your Morse key, and name z-ai/glm-5.1. Reasoning takes "none" or "high" on Morse. Here it decides whether to block the source of a brute-force attempt:
import json
import os
from openai import OpenAI
client = OpenAI(
base_url="https://inference.trymorse.ai/v1",
api_key=os.environ["MORSE_API_KEY"],
)
tools = [
{
"type": "function",
"function": {
"name": "block_ip",
"description": "Add an IP address to the firewall's block list",
"parameters": {
"type": "object",
"properties": {
"ip": {"type": "string"},
"minutes": {"type": "integer"},
},
"required": ["ip", "minutes"],
},
},
}
]
log = "Dec 3 03:12:44 web-2 sshd[811]: Failed password for root from 198.51.100.23 port 40122 ssh2 (x240 in 5m)"
reply = client.chat.completions.create(
model="z-ai/glm-5.1",
reasoning_effort="none",
tools=tools,
messages=[
{"role": "system", "content": "You triage server logs. Block clear brute-force sources for 60 minutes."},
{"role": "user", "content": log},
],
)
for call in reply.choices[0].message.tool_calls or []:
print(call.function.name, json.loads(call.function.arguments))
When we ran this on December 3, 2026, GLM 5.1 returned one block_ip call for 198.51.100.23, 60 minutes, in about 2.2 seconds with reasoning off, and GLM 5, with the id changed to z-ai/glm-5, returned the same call in about 2.1. Morse's model pages measured them on December 1, as the median of 5 streamed replies: GLM 5.1 at 0.61 s to the first token and 61 tokens per second, GLM 5 at 0.71 s and 65. Claude Code and Codex take the same id through Morse's setup guides.
GLM 5, 5.1, or 5.2?
| GLM 5 | GLM 5.1 | GLM 5.2 | |
|---|---|---|---|
| Model id | z-ai/glm-5 | z-ai/glm-5.1 | z-ai/glm-5.2 |
| Context | 198K tokens | 200K tokens | 1M tokens |
| Price | $1 per million input tokens and $3.20 per million output tokens | $1.40 per million input tokens and $4.40 per million output tokens | $1.40 per million input tokens and $4.40 per million output tokens |
Read from Morse's catalog when this page was built.
Which GLM 5 release should you pick?
For new long-running agent work, GLM 5.2: same Morse price, a usable million-token context, and much higher scores on multi-hour tasks. GLM 5.1 remains a solid choice when your prompts and evals were built on it, and GLM 5 is the base all three grew from, at a lower price on Morse. The 5.3 generation adds uncensored builds: GLM 5.3 Uncensored for cybersecurity, agent security, research, and training data work.
Privacy and price
It runs under zero-data-retention terms, and the provider sees Morse as the customer, not you. The open weights let Morse run it on its own providers instead of Z.ai's servers; tier details are on the privacy page. Calls draw on prepaid credits at $1.40 per million input tokens and $4.40 per million output tokens. Make a key and swap the id into the sample.
Common questions
What is GLM 5.1 built for?
Z.ai calls it its next-generation flagship for agentic engineering, with much stronger coding than GLM 5 and the stamina to stay effective on agent tasks over much longer horizons.
How much better is GLM 5.1 than GLM 5?
On Z.ai's table, CyberGym rises from 48.3 to 68.7, Terminal-Bench 2.0 from 56.2 to 63.5, and NL2Repo from 35.9 to 42.7. Math scores are about level.
How big is GLM 5?
744 billion parameters with 40 billion active per token, trained on 28.5 trillion tokens, by Z.ai's GLM 5 card. GLM 5.1 keeps that design.
What license are GLM 5 and 5.1 under?
MIT, per their Hugging Face listings.
Should I use GLM 5.1 or GLM 5.2?
GLM 5.2 adds a usable 1M-token window and scores higher on long engineering tasks at the same Morse price. Keep 5.1 for work you tuned on it.