fix: make the thought option discoverable and honest (category thought_level + real per-model vocabulary) - #44
Closed
lianxin255 wants to merge 3 commits into
Closed
Conversation
The thought option carried category "thought", which no client recognises as the reasoning-effort selector — the ACP ecosystem keys on id/category "effort" / "thought_level" (CodeBuddy, jcode, reasonix all use thought_level). Multica's shared matcher is representative: it selects the effort option by those tokens, so the zcode thinking toggle was invisible to effort pickers and a per-agent reasoning level had nowhere to land. The id stays "thought" (that is what session/set_config_option addresses); only the category changes, which is display/marking metadata. Editors that group config options by category now file it with the other thinking controls instead of a bespoke group. Verified through Multica: with the category aligned, the per-agent thinking picker appears (values enabled/disabled verbatim from the advertised options) and set_config_option dispatches to the runtime's session/setThoughtLevel.
12 tasks
…easoning.variants The lazy session/new advertised a hardcoded max/high/nothink list, which was fiction on both ends for the default coding-plan model: the runtime's own session/read for GLM-5.3 offers low/high/max (default max), and it REJECTS nothink with 'Unsupported reasoning effort'. Clients that relay the advertised options into a picker (Multica's effort selector) then offered tokens the runtime refuses and hid ones it accepts. The pending-session path now reads the enabled provider's models[].reasoning.variants for the default model — the same source the runtime itself resolves — with the static fallback corrected to the verified low/high/max. The value advertised for a live session was and remains the backend's session/read. Verified end-to-end through Multica: the per-agent picker now mirrors the real vocabulary (low/high/max for GLM-5.3) and dispatches tokens the runtime accepts; a behavioural A/B on the same task produced 3 reasoning chunks at low vs 18 at max.
lianxin255
force-pushed
the
fix/thought-option-category
branch
from
August 14, 2026 15:40
ae19a09 to
d5afbd8
Compare
- pending-session buildConfigOptions must advertise the thought option under the spec's thought_level category (the regression the category fix addresses: a bare "thought" category is not one of the reserved SessionConfigOptionCategory names, so effort pickers never found it) - orderThoughtVariants unit tests: canonical ordering with unknown tokens preserved at the end (exported for testability) 461 → 463 tests, all green.
lianxin255
force-pushed
the
fix/thought-option-category
branch
from
August 14, 2026 16:32
e1c5a82 to
88f7f02
Compare
Owner
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.
Two related fixes to the
thoughtconfig option, both found while wiring the ZCode runtime into Multica's per-agent reasoning-effort picker:1. Category
thought_level(wasthought)No ACP client recognises a bare
"thought"category as the reasoning-effort selector — the ecosystem keys on id/categoryeffort/thought_level(CodeBuddy, jcode, reasonix; Multica's shared matcher too). The id staysthought(that is what session/set_config_option addresses); only the category changes.2. Real per-model vocabulary for the pending session
The lazy
session/newadvertised a hardcodedmax/high/nothink, which was fiction on both ends: the runtime's ownsession/readfor GLM-5.3 offers low/high/max (default max) and rejectsnothinkwithUnsupported reasoning effort. A picker fed from the advertised options offered tokens the runtime refuses and hidlowentirely.The pending-session path now derives the list from the enabled provider's
models[].reasoning.variantsfor the default model (GLM-5.3: low/high/max; GLM-5-Turbo: enabled/off) — the same source the runtime resolves — with the static fallback corrected to the verified set. Live-session values were and remain the backend'ssession/read.Verification
expect.any(String)— the default thought value is now config-derived by design, so it legitimately varies per machine)session/read→ low/high/max default max; glm-5.1 → enabled/disabled;setThoughtLevel(nothink)rejected,(max/enabled)accepted