Repository navigation
server: a thinking-off request renders the effort it names; --reasoning-effort can't change a thinking-off prompt (#1911) - #3017
Merged
Conversation
6 of 8 tasks
This was referenced Nov 14, 2026
ashhart
added a commit
that referenced
this pull request
Nov 14, 2026
GLM-5.3's template writes "Reasoning Effort: Max" when it hears no effort, so a thinking-off request could not ask for High or Low. With thinking off, native now passes the template the effort the request (or --reasoning-effort) named, on the template's levels. With none named, or `none`, it passes null as before, so default prompts keep their bytes. Prefix probes, the warm pass and the token-count route carry the same named effort, so their renders match the request's. Host tests: GLM-5.3 thinking-off requests with high, low, none, no effort and a server effort, checked against the template's own render, and namedEffort's rule (no Kimi max fallback, none is unnamed, request wins).
…1911) --reasoning-effort no longer reaches a thinking-off prompt, so default bytes stay unchanged for every server configuration. The reply's tensorfold.reasoning_effort names the effort the template heard (the request's, or none), and the Messages count_tokens route sets the named effort as the chat route does. Host tests: a server started with --reasoning-effort high keeps main's thinking-off prompt; Qwen3.8's template takes a named effort with thinking off (and reads it only while thinking, so its prompt is unchanged), with its template and tokenizer config as fixtures.
ashhart
force-pushed
the
lead/glm-thinking-off-effort
branch
from
November 14, 2026 10:00
b0a3c88 to
c1e2b42
Compare
outcastofmusic
added a commit
to outcastofmusic/TensorFold
that referenced
this pull request
Nov 25, 2026
…shhart#3017) GLM-5.3's template writes "Reasoning Effort: Max" when it hears no effort, and the fork passed an effort only while thinking, so a thinking-off GLM request could not ask for High or Low. With thinking off, the template now hears the effort the request (or --reasoning-effort) named, on the template's levels. With none named, or "none", it hears none as before, so default prompts keep their bytes. The chat route, the Anthropic token count, the prompt-block and token routes and the Mac-style prompt path share template_effort. Of the local checkpoints' templates, only GLM-5.3's changes with thinking off when an effort is passed (Qwen3.8 Flash Next and 27B, Bolt, LFM2.5, KnowLine, Nanbeige, Clef and d1 render the same bytes). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012882unKVWq5Ve1jHg3xizt
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.
Fixes #1911 (reported by @ss-cong): with thinking off, a request that named a reasoning effort still got GLM's default "Max" head, so the prompt was a few tokens off what the request asked for.
Change
server/fields.zignamedEffort, used by chat, completions-from-messages, the warm pass and Messages'count_tokens).--reasoning-effortdoes not change a thinking-off prompt: only the request's own effort does, so default prompts stay byte-identical for every server configuration.tensorfold.reasoning_effortreports the effort the template got, instead ofnone.docs/api.mdsays so.Qwen3.8: its template reads
reasoning_effortonly while thinking is on. With thinking off, a named effort reaches it but the prompt bytes don't change, and a test pins that. The test uses the real template, added as a fixture with its source and licence inTHIRD_PARTY_NOTICES.md.Tests:
test-thinking-request-host38/38, including:--reasoning-effort high, where a thinking-off request that names nothing gets main's prompt;lowstill winning;Putting back the server fallback and main's runtime line fails 3 of them.
test-server-cpu1,313 pass, 7 skipped;test-golden0 unexpected differences; lean 0 new.