Our earlier report on GLM-5.3 and open-weight cyber capability examined what Z.ai’s open-weight model can do on security benchmarks and what open weights change for defenders. This report asks a narrower engineering question: when GLM-5.3 runs inside a coding agent every day, how should thinking effort be dialed per task shape, and what does targeted system-prompt tuning actually cost or change?
The numbers below come from Dexter’s behavioral evaluation harness (packages/evals, built on vitest-evals), run against zai/glm-5.3 and glm-5.3-flash on 26 October 2026 as part of roadmap item G3. On the structured host matrix, every thinking level and both prompt variants passed 9 of 9 cells. Accuracy was flat across the matrix; the real lever was output token volume, tool-call re-reading, and per-task dollar cost.
Facts at a glance:
- Models tested:
glm-5.3andglm-5.3-flashthrough the Z.ai provider (PI_PROVIDER=zai). - Date of runs: 26 October 2026 (
packages/evals/evals/glm-tuning.eval.ts). - Thinking levels swept:
off,low, andhigh(GLM also exposesmax; Dexter’s defaultmediumthinking level maps tohighinpackages/coding-agent/src/core/default-models.ts). - Headline matrix result: 9/9 pass on
glm-5.3(stock prompt), 9/9 pass onglm-5.3(tuned prompt), and 9/9 pass onglm-5.3-flashat roughly 5x lower cost ($0.0008–$0.0016 per task). - Prompt-tuning overhead: ~40 input tokens for three behavioral rules, with no increase in output tokens or tool-call counts.
- Additional suites:
smoke.eval.tspasses onzai/glm-5.3;documentation-audit.eval.tspassed 41/44 pages at thinkingoff, with one borderline page flipping tomatchon re-run.
Evaluation harness and methodology
Dexter separates behavioral evaluations under packages/evals/evals/ into two execution shapes built on vitest-evals:
- Host evals (
*.eval.ts): ordinaryvitest-evalssuites executed locally vianpm run eval:host. These cover fast behavioral checks such assmoke.eval.ts,documentation-audit.eval.ts, andglm-tuning.eval.ts. - Documentation-lift evals (
*.docs.eval.ts): paired comparisons orchestrated bysrc/cli.ts,src/docker.ts,src/plan.ts, andsrc/report.ts. Each case runs in isolatedwithout_docsandwith_docsDocker containers built from local workspace tarballs, with eval definitions, fixtures, and Vitest config made root-owned and unreadable after the harness drops permanently to an unprivileged UID. Onlyread,write,edit,grep,find, andlsare exposed by default, repetition order alternates by run number to reduce order bias, and blocked pairs withhold headline lift while exiting nonzero.
Every suite follows one grading rule: set judgeThreshold: null for comparative scoring so a low score is recorded as data rather than an infrastructure error, reserving Vitest assertions for broken suite invariants.
The GLM thinking-level matrix
packages/evals/evals/glm-tuning.eval.ts sweeps three distinct agent task shapes across every reasoning level listed in GLM_TUNING_LEVELS (default off,low,high):
fact-retrieval: read a single configuration file and returnregion/replicas.code-fix: fix an even-lengthmedian()bug, verify the change withnode, and submit the verified result.investigation: inspect three files to determine which one definesDEFAULT_PORT, then submitpath:value.
Each cell requires exactly one validated submit_answer call matching the expected string. Token counts, tool-call counts, and costs are written to a JSONL sidecar configured via GLM_TUNING_RESULTS. Switching between the tuned production prompt and the unedited baseline is controlled by GLM_TUNING_PROMPT=stock:
ZAI_API_KEY=... PI_PROVIDER=zai PI_MODEL=glm-5.3 \
GLM_TUNING_RESULTS=results.jsonl \
npm run eval:host -- evals/glm-tuning.eval.ts # tuned (production) prompt
GLM_TUNING_PROMPT=stock ... # baseline without GLM guidelines
Measured results across thinking levels
On the 26 October 2026 runs, all 9 cells of the glm-5.3 matrix passed for both the stock prompt and the tuned production prompt. Because correctness did not vary with thinking level on these bounded tasks, the measurements isolate what higher reasoning effort costs in tokens, tool calls, and dollars.
GLM-5.3 with stock prompt
| Task | Level | Input / Output tokens | Tool calls | Cost |
|---|---|---|---|---|
fact-retrieval |
off |
222 / 42 | 2 | $0.0020 |
fact-retrieval |
low |
210 / 30 | 2 | $0.0020 |
fact-retrieval |
high |
252 / 93 | 2 | $0.0023 |
code-fix |
off |
437 / 204 | 4 | $0.0052 |
code-fix |
low |
626 / 302 | 5 | $0.0069 |
code-fix |
high |
871 / 659 | 4 | $0.0079 |
investigation |
off |
203 / 33 | 2 | $0.0022 |
investigation |
low |
199 / 33 | 2 | $0.0022 |
investigation |
high |
398 / 216 | 4 | $0.0042 |
Three patterns stand out immediately in the stock table:
- Lookup tasks get nothing from
high: onfact-retrieval, moving fromlowtohighraised output tokens from 30 to 93 (over 3x) while keeping tool calls at 2 and accuracy unchanged. - Simple investigations double tool calls at
high: oninvestigation,offandloweach solved the task in 2 tool calls and 33 output tokens ($0.0022). Raising thinking tohightriggered 4 tool calls (mostly re-reading) and 216 output tokens, nearly doubling task cost to $0.0042. - Code edits pay for self-verification at
high: oncode-fix,offused 204 output tokens ($0.0052),lowused 302 output tokens ($0.0069), andhighrose to 659 output tokens ($0.0079) as the model produced more self-verification output.
Stock vs. tuned production prompt
The tuned production prompt appends three behavioral rules targeted specifically at observed GLM habits: narrating plans before calling tools, restating tool output back to the user, and adding decorative markdown to short replies. Those rules live in glmPromptGuidelines inside packages/coding-agent/src/core/system-prompt.ts, wired through agent-session.ts, and gate on Z.ai providers or GLM model identifiers (including gateway IDs such as zai-org/GLM-5.2):
- Call tools directly without narrating the plan first; report results only after they return.
- Do not restate tool output back to the user; summarize the conclusion instead.
- Use markdown structure only when it aids comprehension, not decoration.
| Prompt variant | Matrix pass rate | Cache-warm fact-retrieval (off) |
Input overhead | Output tokens & tool calls |
|---|---|---|---|---|
Stock (GLM_TUNING_PROMPT=stock) |
9 / 9 | 222 in / 42 out | Baseline | Baseline |
| Tuned (production default) | 9 / 9 | 258 in / 30 out | ~40 input tokens | No increase |
A measurement subtlety on Z.ai’s endpoint is worth flagging explicitly: inputTokens is prompt-cache-dependent. Cold-cache rows report the full ~2.7k-token system prompt, whereas cache-hit rows report only the uncached remainder. Input token columns are therefore not directly comparable across runs unless cache state matches. Cross-run prompt comparisons must look at output tokens and tool-call counts instead; on both metrics, the tuned guidelines added zero overhead while costing roughly 40 input tokens on cache-warm turns.
GLM-5.3-Flash cost and caching profile
glm-5.3-flash passed 9/9 cells across off, low, and high at roughly 5x lower cost than flagship glm-5.3: $0.0008 to $0.0016 per task. Unlike flagship glm-5.3, the Flash endpoint has no prompt caching, so input token counts charge the full context on every request. Even without caching, Flash’s unit economics make it a strong default for high-volume mechanical work, reserving flagship glm-5.3 for investigation-heavy coding.
Recommended thinking levels by task type
Combining the matrix numbers with longer-form evaluation behavior yields five operational defaults for GLM-5.3 inside Dexter:
| Task type | Recommended level | Basis from observed runs |
|---|---|---|
| Factual retrieval / lookup | off or low |
Answer is one read away; high adds ~3x output tokens with no accuracy gain in the matrix. |
| Code fixes, verified edits | low–high |
low solved the median fix with fewer tokens than high, while high produced more self-verification output. Both were correct; Dexter’s default medium→high mapping is a safe floor on real repositories where fixes are less localized. |
| Multi-file investigation | low |
Correct at every level; high tripled token use (mostly re-reading) on simple sweeps. Escalate to high or max only when trails are long or cross-cutting. |
| Documentation audits | high |
Verdict quality depends on reading discipline; borderline pages flip between match and inconclusive across runs when the model reads less carefully. |
| Interactive chat / cheap iterations | off |
Fastest and cheapest; GLM-5.3 remains accurate on short factual turns. |
In practice, keep Dexter’s shipped medium→high mapping for general agentic coding, drop to low via /model glm-5.3:low (or a models.json override) for bulk mechanical sweeps, and route cost-sensitive batch tasks to glm-5.3-flash.
Broader suite observations
Two existing host suites were also exercised against zai/glm-5.3:
smoke.eval.ts: passes onzai/glm-5.3.documentation-audit.eval.ts: 41 of 44 pages passed onglm-5.3with thinking set tooff. Three borderline pages (custom-provider.md,environment-variables.md, andusage.md) returned non-matchverdicts on the initial pass, andcustom-provider.mdflipped back tomatchon a re-run. That behavior reflects verdict noise rather than deterministic documentation bugs; operators should re-run individual flagged pages with-t "'<page>.md' matches"(and preferhighthinking for audit passes) before filing documentation defects.
Limitations and open measurements
Several boundaries limit what these runs prove:
- Ceiling saturation on host fixtures: 9/9 pass across every level for both
glm-5.3andglm-5.3-flashmeans the tuning matrix measures token and tool-call efficiency, not whereofforlowbegins to lose accuracy on multi-hop repository edits. - Unscored prose style: the three
glmPromptGuidelinesbullets govern conversational prose—suppressing pre-tool narration, output echo, and decorative formatting—which the matrix’s structuredsubmit_answervalidator does not score. Keeping theGLM_TUNING_PROMPT=stockflag ensures future prose or transcript rubrics can still run clean A/B checks. - Cache-state confounding on input tokens: because Z.ai’s
inputTokensfigure drops from ~2.7k (cold) to the uncached delta (warm), input-token rows cannot be compared blindly across sessions. - Single-run variance: as Dexter’s eval documentation notes, one repetition cannot establish stability; the
documentation-audit.eval.tsflip oncustom-provider.mdillustrates that borderline judgments require repeated runs before drawing conclusions. - Docker documentation-lift evals deferred: paired
*.docs.eval.tscontainer runs require an active Docker daemon and were outside the scope of this pass.
Sources
packages/evals/docs/glm-tuning.md(Dexter repository, ROADMAP item G3, 26 October 2026)packages/evals/README.md(Dexter repository, behavioral eval runner and documentation-lift isolation specification)- GLM-5.3 and open-weight cyber capability: what the evidence supports (Velofy Lab, 3 October 2026)