GLM-4.7 Guide: The Last GLM-4 Flagship, and Where It Still Fits
Z.ai's December 2025 flagship is a 358B MIT-licensed model with a 200K window and three thinking controls. What it does, what it costs, and when to move up.
GLM-4.7 is easy to dismiss in October 2026. Z.ai has shipped GLM-5, 5.1, 5.2 and the 5.3 family since, and each of them moved the headline numbers. But GLM-4.7 is still on the price list, still MIT-licensed, and still noticeably cheaper per token than any full-size GLM-5 model.
That makes it worth understanding properly rather than writing off. The question is not whether it is the best GLM — it is not — but which jobs do not need anything better.
What GLM-4.7 is
Z.ai released GLM-4.7 on 22 December 2025 as the flagship of the GLM-4 line. The Hugging Face model card lists 358B parameters, and the weights are published under the MIT licence, so you can fine-tune, redistribute and serve it commercially without a separate agreement.
Z.ai's documentation gives a 200K-token context window and a 128K maximum output. Input and output are text only. It supports function calling, context caching and structured JSON output, which covers what most agent harnesses need.
Z.ai lists three tiers in the 4.7 generation: the flagship covered here, a lightweight FlashX, and a free Flash tier. If you are choosing within the generation, the GLM-4.7 Flash guide covers the small end.
Three thinking controls worth knowing
The most practical thing about GLM-4.7 is not a benchmark. It is how much control you get over reasoning, which later GLM releases partly took away.
- Interleaved thinking. The model reasons before each response and before each tool call, rather than once at the start of a turn. In an agent loop that means it reconsiders after every tool result.
- Preserved thinking. In coding-agent scenarios, reasoning blocks are kept across turns instead of being discarded. Z.ai says this improves cache hit rates and so lowers cost, since the prefix stays stable.
- Turn-level thinking. Reasoning can be switched on or off per turn through
thinking.type. A file listing or a formatting request does not need a reasoning pass; a failing test does.
The last one matters more than it looks. GLM-5.3 made reasoning mandatory, so with the newer model you can lower the effort but never skip it. On GLM-4.7 you can send cheap turns as genuinely cheap turns, which is a real lever when most of an agent's calls are mechanical. The token cost of reasoning models explains why hidden reasoning output dominates bills.
The benchmark profile, read carefully
Z.ai's model card reports, among others:
- SWE-bench Verified — 73.8
- SWE-bench Multilingual — 66.7
- Terminal Bench 2.0 — 41.0
- τ²-Bench — 87.4
- LiveCodeBench v6 — 84.9
- HLE — 24.8 without tools, 42.8 with tools
- GPQA-Diamond — 85.7
Two things stand out. The Terminal Bench 2.0 figure is the weak spot: the same table gives Gemini 3.0 Pro 54.2, and GLM-4.7 scores 33.3 on the harder Terminal Bench Hard set. These are vendor-run numbers, and public leaderboards with different scaffolds often land elsewhere. Terminal-style long-horizon work is where the GLM-5 line later improved most visibly; GLM-5.1's card reports 63.5 on Terminal-Bench 2.0 under Terminus-2, though a different harness makes that a rough rather than exact comparison.
The second is that the strongest numbers are on bounded tasks: a single issue, a single competitive programming problem, a tool-use conversation with a defined end. That is a fair description of where GLM-4.7 is still competitive.
What it costs next to the 5.x line
Z.ai's pricing page lists GLM-4.7 at $0.60 per million input tokens, $0.11 for cached input and $2.20 per million output. GLM-5.1, 5.2 and 5.3 are all listed at $1.40 input and $4.40 output. On OpenRouter, GLM-4.7 was listed at the same $0.60 and $2.20 at the time of writing.
So the newer flagships cost about twice as much per token: 2.3 times on input, exactly double on output. Whether that is a saving depends on turns to completion. If GLM-4.7 takes twice as many turns to finish a long task, the cheaper rate buys you nothing and costs wall-clock time. If the task is short and bounded, the cheaper rate is simply cheaper.
The smaller GLM-5.3 Flash complicates this. Z.ai lists it well below GLM-4.7 per token, with a 1M window and image input. For new projects that changes the default; see the GLM-5.3 Flash guide before choosing GLM-4.7 on price alone.
When GLM-4.7 is still the right call
There are three honest cases.
- You need to turn reasoning off. High-volume classification, extraction or rewriting where a reasoning pass is pure overhead. GLM-4.7 lets you disable it entirely.
- You already self-host it. A working deployment of an MIT model you have evaluated is worth more than a benchmark delta you have not measured on your own work.
- Your prompts fit in 200K and your tasks are bounded. Single-issue fixes, code review of one diff, UI generation from a spec. The 1M windows of later models solve a problem you do not have.
And the cases where it is the wrong call: anything that runs for hundreds of tool calls, anything that needs to hold a whole repository in context, and anything involving images. The first two are what the GLM-5 line was built for, with the 1M windows arriving in GLM-5.2. GLM-4.7 is text-only, so image work needs a vision model such as GLM-5.3 Flash.
A quick decision rule
Run your ten most common task types through GLM-4.7 with thinking off, GLM-4.7 with thinking on, and one current GLM-5.3 model. Record cost per completed task, not cost per token. If GLM-4.7 with thinking off solves most of them, route that slice to it and send the rest upward — the pattern model routing and fallbacks describes. If it only wins with thinking on, the price gap has mostly closed and the newer model is the simpler choice.
Common questions
Is GLM-4.7 open source?
The weights are published on Hugging Face under the MIT licence, so you can fine-tune, redistribute and serve it commercially. The model card lists 358B parameters, which makes self-hosting a multi-GPU job rather than a workstation one.
What is the context window of GLM-4.7?
Z.ai documents a 200K-token context window with up to 128K tokens of output. That is a fifth of the 1M windows offered by GLM-5.2 and the GLM-5.3 family, which matters mainly for long agent runs and whole-repository prompts.
Can I disable reasoning on GLM-4.7?
Yes. Set thinking.type to disabled, either for a whole session or per turn. This is one of the practical differences from GLM-5.3, where reasoning is always on and you can only lower the effort level.