Skip to content

fix(config): keep GLM-5.3-Flash reasoning private on every route - #326

Merged
krisztian-gajdar merged 2 commits into
mainfrom
fix/glm53-private-reasoning
Sep 22, 2026
Merged

krisztian-gajdar merged 2 commits into
mainfrom
fix/glm53-private-reasoning

Conversation

@krisztian-gajdar

@krisztian-gajdar krisztian-gajdar commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Private reasoning on every route. GLM-5.3-Flash's chat template always opens a thinking block and never reads enable_thinking. The queued worker hides reasoning only when a model declares chat_template_kwargs.enable_thinking, so a queued response carried the reasoning and its closing </think> tag in front of the answer. Declaring enable_thinking: true marks that reasoning private. On the direct route, reasoning_parser: glm45 has the engine split it off, and the proxy already drops the split field. The template ignores the flag itself, so the rendered prompt is unchanged.
  • Behaviour change: a request whose output budget runs out inside the thinking block now fails closed with empty_model_output, instead of returning the partial reasoning as content. Budgets must leave room for the reasoning. A one-token chat probe can no longer succeed on this model; a raw-prompt generate probe still can.
  • Image comment. The old comment named the wrong cause. The pinned engine resolves transformers 5.12.1, which has no glm5_next processor, so SGLang falls back to a bare tokenizer and never expands an image ([Bug] GLM-5.3-Flash vision silently broken on main: pinned transformers==5.12.1 lacks glm5_next, AutoProcessor degrades to TokenizersBackend sgl-project/sglang#39831). The fix to wait for is the engine's transformers bump ([Deps] Bump transformers to 5.17.0 sgl-project/sglang#39012). inputs.image stays false.
  • Startup budget. Cold starts on eight H100s took from 684 s to about 36 minutes. Reading the 306 GiB checkpoint took from a few minutes to 25 minutes, and decode CUDA-graph capture about 7.5 more. One slow start exceeded the old 1800 s budget. The budget is now 2400 s.
  • Grammar and tools stay unclaimed here. fix(server): tell SGLang when a native generate request starts inside reasoning #327 and feat(server): parse and force GLM tool calls on the queued route #328 make both work on the queued route, and a follow-up claims them.

Verification

On eight H100s, through a local gateway, NATS, sidecar and worker, with this YAML plus #327 and #328:

Probe Result
Chat, "What is 17 * 23?" 391, no <think>/</think>, no reasoning field, finish_reason: stop, 44 completion tokens
Streaming chat 391 over 7 chunks, no reasoning text
Chat with a json_schema response format {"capital": "Paris"} after the hidden reasoning
  • In 200 multiple-choice rows, every row whose budget ran out inside the reasoning (68 of 100 at 256 tokens, 28 of 100 at 2048) returned empty_model_output, as described above.
  • Locally, packages/sie_server/tests/config, core/test_loader.py and core/test_revision_identity.py pass. Four test_serving_artifacts cases fail on macOS because they need Linux's atomic no-replace rename; CI runs them on Linux.

Summary by CodeRabbit

  • New Features

    • Enabled private reasoning for GLM-5.3-Flash responses.
    • Added improved handling for reasoning output.
  • Bug Fixes

    • Clarified that GLM-5.3-Flash supports text input only.
    • Improved startup reliability by allowing more time for the model to initialize.
  • Documentation

    • Expanded guidance on model startup duration and current feature support.
    • Documented that grammar and tool-calling support are currently unavailable.

@krisztian-gajdar
krisztian-gajdar requested a review from a team as a code owner September 22, 2026 14:35
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 956e7114-b06e-4abb-be66-7e7714fd176e

📥 Commits

Reviewing files that changed from the base of the PR and between 369f8f5 and 5d73aed.

📒 Files selected for processing (1)
  • packages/sie_server/models/zai-org__GLM-5.3-Flash.yaml

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The GLM-5.3-Flash configuration documents text-only support, enables private thinking, retains unsupported grammar and tool calling, increases the startup timeout, expands startup timing notes, and adds the glm45 reasoning parser.

Changes

GLM-5.3-Flash configuration

Layer / File(s) Summary
Capabilities and thinking configuration
packages/sie_server/models/zai-org__GLM-5.3-Flash.yaml
The model is documented as text-only because the pinned engine lacks the glm5_next image processor. Generation enables private thinking. Grammar and tool calling remain unsupported.
Startup and reasoning parser
packages/sie_server/models/zai-org__GLM-5.3-Flash.yaml
Startup documentation covers cold starts from 684 seconds to approximately 36 minutes. startup_timeout_s increases from 1,800 to 2,400 seconds. The glm45 reasoning parser is added.

Suggested reviewers: dragosboca

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 5d73a

The cold-start allowance is 2,400 seconds instead of the stated 3,600 seconds; although it exceeds the documented roughly 36-minute startup, the intended deployment timeout should be confirmed before merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: keeping GLM-5.3-Flash reasoning private on every route. It is concise and directly matches the pull request objectives.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 22, 2026
GLM-5.3-Flash's chat template always opens a thinking block and never
reads enable_thinking. The queued worker hides reasoning only when a model
declares chat_template_kwargs.enable_thinking, so a queued response carried
the reasoning and its closing </think> tag in front of the answer.
Declaring it true marks that reasoning private there. On the direct route
the glm45 reasoning parser splits it off in the engine, and the proxy
already drops the split field.

The image comment named the wrong cause. The pinned engine resolves
transformers 5.12.1, which has no glm5_next processor, so SGLang falls back
to a bare tokenizer and never expands an image (sgl-project/sglang#39831).
The engine's transformers bump (sgl-project/sglang#39012) is the fix to wait
for.

A cold start on eight H100s exceeded the 1800 s startup budget when reading
the 306 GiB checkpoint took 25 minutes. The budget is now 3600 s.

Grammar and tool calling stay unclaimed, and the comment now says why.
…sured cold start

Two cold starts on slow hosts took about 32 and 36 minutes, most of it
reading the checkpoint. 2400 s covers both without doubling the budget.
@krisztian-gajdar
krisztian-gajdar merged commit 1ffb19c into main Sep 22, 2026
21 checks passed
@krisztian-gajdar
krisztian-gajdar deleted the fix/glm53-private-reasoning branch September 22, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant