You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2bb2d5f
Browse filesBrowse the repository at this point in the historyBrowse files
Fix: never send thinking:{type:"disabled"} to a GLM-5.3 model
Z.AI documents thinking as impossible to turn off for this family —
thinking.type accepts only "enabled" — and prescribes an explicit
migration: switch to enabled and set the effort to low, "otherwise the
request will fail".
https://docs.z.ai/guides/llm/glm-5.3 (Migration Notice)
https://docs.z.ai/guides/vlm/glm-5.3-flash
Live probing did not reproduce that failure: a disabled request came
back 200, with 54 chars of thinking for glm-5.3 and none for
glm-5.3-flash. So this is not a fault we have observed. It is about not
sending a shape the vendor documents as unsupported — the warning is
written against the OpenAI-protocol upstream, which is exactly what
start-plan uses, and a gateway is free to begin enforcing it. "low" is
also the closest honest approximation of off: it measured zero thinking
on glm-5.3-flash and the family minimum on glm-5.3.
A client body can reach an upstream through four routes, and the rewrite
has to hold on all of them. The two translated ones were the easy half:
- OpenAI client on coding-plan (openai-to-anthropic) previously
forwarded "disabled" untouched; it now resolves to the low effort
level, budget included.
- Anthropic client on start-plan (anthropic-to-openai) now emits
enabled + reasoning_effort, with an explicit output_config.effort
still winning over the substitute.
The other two forward the client body verbatim, with no translator in
the path at all, so body-transformer covers them: an Anthropic client on
coding-plan gets the enabled form with the effort's paired budget fitted
to max_tokens, and an OpenAI client on start-plan gets enabled plus
reasoning_effort. Both leave an effort the client already chose alone.
Scoped strictly to the GLM-5.3 family. glm-4.7 and friends genuinely
support disabling — measured zero thinking when it is sent — and are
untouched, which the tests assert.
Verified on the wire, not just in unit tests. Upstream bodies captured
through the running proxy:
Anthropic client, glm-5.3, disabled -> {"thinking":{"type":"enabled","budget_tokens":8000},"output_config":{"effort":"low"}}
OpenAI client, glm-5.3-flash, disabled -> {"thinking":{"type":"enabled","budget_tokens":8000},"output_config":{"effort":"low"}}
Anthropic client, glm-4.7, disabled -> {"thinking":{"type":"disabled"}}
all three 200.
0 commit comments