Skip to content

fix: make the thought option discoverable and honest (category thought_level + real per-model vocabulary) - #44

Closed
lianxin255 wants to merge 3 commits into
william0wang:mainfrom
lianxin255:fix/thought-option-category
Closed

fix: make the thought option discoverable and honest (category thought_level + real per-model vocabulary)#44
lianxin255 wants to merge 3 commits into
william0wang:mainfrom
lianxin255:fix/thought-option-category

Conversation

@lianxin255

@lianxin255 lianxin255 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Two related fixes to the thought config option, both found while wiring the ZCode runtime into Multica's per-agent reasoning-effort picker:

1. Category thought_level (was thought)

No ACP client recognises a bare "thought" category as the reasoning-effort selector — the ecosystem keys on id/category effort / thought_level (CodeBuddy, jcode, reasonix; Multica's shared matcher too). The id stays thought (that is what session/set_config_option addresses); only the category changes.

2. Real per-model vocabulary for the pending session

The lazy session/new advertised a hardcoded max/high/nothink, which was fiction on both ends: the runtime's own session/read for GLM-5.3 offers low/high/max (default max) and rejects nothink with Unsupported reasoning effort. A picker fed from the advertised options offered tokens the runtime refuses and hid low entirely.

The pending-session path now derives the list from the enabled provider's models[].reasoning.variants for 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's session/read.

Verification

  • vitest: 461/461 (one assertion relaxed to expect.any(String) — the default thought value is now config-derived by design, so it legitimately varies per machine)
  • Runtime probes: GLM-5.3 session/read → low/high/max default max; glm-5.1 → enabled/disabled; setThoughtLevel(nothink) rejected, (max/enabled) accepted
  • Through Multica: the per-agent picker now mirrors the real vocabulary and dispatches tokens the runtime accepts

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.
@lianxin255 lianxin255 changed the title fix: advertise the thought option under category thought_level fix: make the thought option discoverable and honest (category thought_level + real per-model vocabulary) Aug 14, 2026
…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
lianxin255 force-pushed the fix/thought-option-category branch from ae19a09 to d5afbd8 Compare August 14, 2026 15:40
- 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.
@william0wang

Copy link
Copy Markdown
Owner

Superseded by #47 (contains all three commits plus the pending-current-model fix). Merging #47; closing this one — thanks!

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.

2 participants