Skip to content

feat: add GLM-5.4 for Z.AI Coding Plan users - #204522

Merged
steipete merged 1 commit into
mainfrom
claude/glm-5-4-openclaw-support-49aad5
Nov 24, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/glm-5-4-openclaw-support-49aad5

Conversation

@steipete

@steipete steipete commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Z.AI released GLM-5.4 on November 23, 2026 for GLM Coding Plan subscribers. OpenClaw did not know the model, so Coding Plan users could not pick it from the catalog. New setups also still defaulted to GLM-5.3. And without a catalog row, OpenClaw would send GLM-5.4 the older on/off thinking switch, which does not match what the model accepts.

User Impact

User impact: Coding Plan users can select zai/glm-5.4, and new Coding Plan setups use it by default. It supports 1,048,576-token context, 131,072 output tokens, text and image input, and /think off|low|high|max (default max). The general Z.AI API default stays glm-5.2, because GLM-5.4 is only on the Coding Plan for now.

Released installs pick up the new row from the hosted catalog. Their own resolvers do not carry the row's effort mapping, so on those versions off sends thinking disabled and every other level sends thinking enabled (Z.AI's full-thinking default) without reasoning_effort. Offered levels: 2026.11.7 off/on (default off); 2026.10.33 the full ladder (default max); 2026.11.10-beta.3 off/low/high/max (default max).

Why This Change Was Made

GLM-5.4 gets its own catalog row, and the row describes its thinking levels. Following the catalog rule for a new model in a known family, there are no new per-model-ID entries in the plugin. What each level sends was chosen from live probes of the Coding Plan API (2026-11-23):

  • GLM-5.4 accepts thinking: {type: "disabled"}, so off sends that. GLM-5.3 does not accept it.
  • Z.AI's own reasoning_effort: "low" matched thinking-disabled token for token across paired samples, while "medium" is a real light tier. So low maps to "medium", and a user who picks low still gets some reasoning.
  • "high" and "max" are distinct full tiers. With no effort, the model behaves like "max", so max is the default.
  • Z.AI does not validate reasoning_effort: an unknown value returns 200. That is why the row lists exactly the efforts the model actually honors.

Coding Plan endpoint detection now tries glm-5.4 first, then falls back to glm-5.1 and glm-4.7 as before. glm-5.4 replaces glm-5.3 in the recommended-models list. The docs, the Code Mode table and the Coding Plan live smoke now target GLM-5.4. Z.AI also lists video and file input for GLM-5.4; OpenClaw sends text and images, and the docs say so.

Evidence

Live end to end on an isolated Gateway with a real Coding Plan key. A fresh state dir and its own port were used, so no existing install or state was touched.

  • Onboarding: with --auth-choice zai-api-key, endpoint detection picked the Coding Plan global endpoint and set zai/glm-5.4 as primary.
  • Model listing: models list shows GLM-5.4 with text+image and 1,048,576 context.
  • Thinking: agent turns at the default (max), off, low and explicit max all completed. --thinking medium is rejected with the valid levels listed.
  • Image and tools: GLM-5.4 named the color of a 256 px red PNG opened through the read tool. An exec tool call returned the expected output.
  • Live smoke: ZAI_CODING_LIVE_TEST=1 pnpm test:live src/agents/zai.live.test.ts passed.
  • Request shape: a new test in extensions/zai/index.test.ts runs the real zai wrapper and the OpenAI-completions serializer on the shipped row. It checks exactly what each level sends: off → thinking disabled; minimal/low/medium → "medium"; high → "high"; xhigh/max → "max".
  • Released versions: after merge, pnpm catalog:compare-released --filter zai (with the fix in fix: let maintainers compare catalog changes against released readers again #204528) completed for 2026.11.7, 2026.10.33 and 2026.11.10-beta.3 against a candidate built from main. The only change on each is zai/glm-5.4 becoming listed, with the request shapes described under User Impact. An earlier pre-merge check that ran only each release's zai thinking hook had predicted "on" would send "medium"; the full resolver run superseded it.
  • Post-merge live run: on merged main, a request tap (a before_model_request hook in a throwaway plugin) recorded the fields sent per level through a real Gateway: off → thinking disabled, low → reasoning_effort: "medium", high → "high", max → "max".
  • Local checks: Z.AI plugin tests, the catalog thinking-profile contract test, lint, format and the docs check pass.

Simplification pass: no new modules, helpers or state. The change is one manifest row, two constant/ID updates, docs and tests.

Add a GLM-5.4 catalog row (1M context, 128K output, text and image input)
with a row-owned thinking profile: off sends thinking disabled, low maps to
reasoning_effort "medium" because GLM-5.4's own "low" behaves like thinking
off, and high/max send "high"/"max". Coding Plan setup and endpoint
detection now prefer glm-5.4, and glm-5.4 succeeds glm-5.3 in the
recommended models list.
@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review ended

ClawSweeper stopped reviewing this revision because the pull request closed.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts agents Agent runtime and tooling extensions: zai size: S labels Nov 24, 2026
@steipete
steipete marked this pull request as ready for review November 24, 2026 08:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T09:00:32.377003Z 7407a6b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7407a6b17f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"supportsReasoningEffort": true,
"supportedReasoningEfforts": ["medium", "high", "max"],
"thinkingLevels": ["off", "low", "high", "max"],
"defaultThinkingLevel": "max"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor the catalog default in direct GLM-5.4 completions

When a direct/simple completion omits options.reasoning, GLM-5.4 runs with thinking disabled instead of this declared max default. wrapZaiSimpleCompletionStreamFn in extensions/zai/index.ts falls back to the plugin's resolveThinkingProfile, which recognizes only GLM-5.2 and GLM-5.3 and returns off for GLM-5.4; the wrapper then injects thinking: { type: "disabled" }. The new payload test supplies an explicit level for every case, so it misses this default path. Resolve the omitted level from the model's catalog-owned profile rather than the legacy ID-based fallback.

AGENTS.md reference: src/plugins/AGENTS.md:L52-L52

Useful? React with 👍 / 👎.

@steipete
steipete enabled auto-merge (squash) November 24, 2026 09:07
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 24, 2026
@steipete
steipete merged commit 9125deb into main Nov 24, 2026
208 of 213 checks passed
@steipete
steipete deleted the claude/glm-5-4-openclaw-support-49aad5 branch November 24, 2026 09:11
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Nov 24, 2026
* commit '391dea93e0a97fff97f9f3d5e94eac992b247b09': (21 commits)
  test(update): cover maintenance release before conversion (#204548)
  fix(ci): control memory pressure in cron rearm fixture (#204543)
  fix: align release workflow tests with retained evidence
  test(ui): open the Settings drawer by keyboard before the Escape check (#204539)
  fix(ci): avoid redundant globs for literal test inventories (#204529)
  fix(pr): retain protected resources after native squash merges (#204496)
  fix(ui): show the check mark on the custom ask_user answer (#199999)
  chore(ui): refresh control ui locales (#204542)
  fix(update): build Git releases only once (#204512)
  fix(ci): avoid repeated full-inventory matching (#204525)
  test(ci): align exec completion fixtures with process instances (#204507)
  test(update): replace mocked JSON routing with child proof (#204527)
  fix(slack): reject system events with an unresolved conversation type (#204444)
  test(agents): distinguish the source-session root (#204524)
  perf(ai): keep Responses tool history checkpointed across turns (#204519)
  feat(zai): add GLM-5.4 as the Coding Plan default (#204522)
  ci: cover unscheduled test files daily and fail when a test has no scheduled lane (#204472)
  fix(ci): model a distinct FRV job retry in CLI fixtures (#204517)
  improve(ui): defer sign-in controls until needed (#204484)
  test(agents): assert the prepared MCP hook prompt (#204508)
  ...
tideclaw-bot pushed a commit that referenced this pull request Nov 25, 2026
Add a GLM-5.4 catalog row (1M context, 128K output, text and image input)
with a row-owned thinking profile: off sends thinking disabled, low maps to
reasoning_effort "medium" because GLM-5.4's own "low" behaves like thinking
off, and high/max send "high"/"max". Coding Plan setup and endpoint
detection now prefer glm-5.4, and glm-5.4 succeeds glm-5.3 in the
recommended models list.

(cherry picked from commit 9125deb)
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 25, 2026
Add a GLM-5.4 catalog row (1M context, 128K output, text and image input)
with a row-owned thinking profile: off sends thinking disabled, low maps to
reasoning_effort "medium" because GLM-5.4's own "low" behaves like thinking
off, and high/max send "high"/"max". Coding Plan setup and endpoint
detection now prefer glm-5.4, and glm-5.4 succeeds glm-5.3 in the
recommended models list.
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
Add a GLM-5.4 catalog row (1M context, 128K output, text and image input)
with a row-owned thinking profile: off sends thinking disabled, low maps to
reasoning_effort "medium" because GLM-5.4's own "low" behaves like thinking
off, and high/max send "high"/"max". Coding Plan setup and endpoint
detection now prefer glm-5.4, and glm-5.4 succeeds glm-5.3 in the
recommended models list.

(cherry picked from commit 9125deb)

Companion audit: 1d6b82d is an independent OpenAI model change, not applicable to Z.AI catalog support.

Release adaptation: Retain the stable GLM-5.3 default, detect/probe ordering and recommendation list; port the explicit GLM-5.4 catalog, profile and qualification only.

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:intake:feature Preliminary submission classification; full source review pending. docs Improvements or additions to documentation extensions: zai scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant