feat(reasoning): expose GLM-5.3 thinking effort levels - #1726
Open
DreamFate wants to merge 1 commit into
Open
Conversation
GLM-5.3 endpoints now accept effort levels (verified 2026-08-17): - /api/anthropic: adaptive thinking effort low/medium/high/max - /api/v1 (OpenAI Responses): all five levels natively - /api/paas/v4: reasoning_effort low/high/max (medium degrades to high) Replace the off/high-only toggle with a full profile following the GLM-5.2 template: adaptive-effort (anthropic), zai-thinking-effort (openai-completions) and openai-reasoning-effort (openai-responses). Drop the now-unused zai-toggle and anthropic-manual encodings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GLM-5.3 currently exposes only an off/high toggle (
zai-toggle/anthropic-manual), based on the conclusion in #1708 that official endpoints only accept a thinking switch. That conclusion is now outdated — Zhipu endpoints have since added effort support.Verified against
open.bigmodel.cnwith real keys on 2026-08-17:/api/anthropicthinking:{type:'adaptive',effort}— low/medium/high/max all 200 with thinking blocks/api/paas/v4reasoning_effortaccepts low/high/max onlymediumreturns 400: "请使用 low、high 或 max"/api/v1(OpenAI Responses)reasoning.effort— minimal/low/medium/high/max all natively supportedChanges
Follows the existing GLM-5.2 profile template — no new mechanisms, no UI changes:
GLM_53_LEVELS:['off','high']→['off','low','medium','high','max']anthropic-messages:adaptive-effort(native mapping)openai-completions:zai-thinking-effort(mediumdegrades tohigh, same pattern GLM-5.2 uses for level compression)openai-responses:openai-reasoning-effort(native mapping, fixes the profile not matching at all for Responses-mode channels)normalizeGlm53Levelwidened; existing sessions (off/high) migrate losslesslyzai-toggle/anthropic-manualencoding kinds and their compile branchesNotes
zhipu) uses openai-completions; Plan (zhipu-coding) and Team (zhipu-coding-team) share the anthropic-messages path (their default base URL is/api/anthropic, seechannel.ts)/api/v1users can use the existing genericopenai-responseschannel typeVerification
bun run typecheckclean; 489 tests pass (1 pre-existing planning-db failure also on main)/api/anthropic): slider "low" producedthinking:{type:'adaptive',effort:'low'}in the request body (captured through a local pass-through proxy); responses normal