Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Use a provider whose reasoning select advertises its levels in descending order with the off level last. On my setup this is an ACP Registry agent exposing
Qwen4-Max, whose Reasoning Effort menu listsExtra High,High,Low,None— i.e.["xhigh", "high", "low", "none"]. - In the composer, open the model picker → Reasoning Effort.
- Select
Extra High, close the menu, and look at the bars in the model trigger. - Select
Noneand look at the bars again.
No provider is needed to reproduce the logic — resolveEffortGlyph alone shows it (descriptor shape simplified):
const descriptor = {
type: "select",
id: "reasoningEffort",
options: [
{ id: "xhigh", label: "Extra High" },
{ id: "high", label: "High" },
{ id: "low", label: "Low" },
{ id: "none", label: "None" },
],
};
resolveEffortGlyph(descriptor, "xhigh"); // { count: 4, filled: 1 } — expected filled: 4
resolveEffortGlyph(descriptor, "none"); // { count: 4, filled: 4 } — expected filled: 0Expected behavior
Bars rise with reasoning effort, as they already do for Codex / Claude / Antigravity: Extra High = 4 of 4 filled, High = 3, Low = 2, None = 0 filled.
Actual behavior
The scale is inverted, and the off level reads as maximum:
| Selected | Menu label | Bars filled (actual) | Expected |
|---|---|---|---|
xhigh |
Extra High | 1 of 4 | 4 of 4 |
high |
High | 2 of 4 | 3 of 4 |
low |
Low | 3 of 4 | 2 of 4 |
none |
None | 4 of 4 | 0 of 4 |
Extra High (only the shortest bar opaque, other three at 0.4) and None (all four opaque) were confirmed visually on 0.1.12; High and Low follow from the same code path.
The selected effort is still applied correctly — only the indicator is wrong. But it actively misleads in both directions: the strongest setting looks like the weakest, and "no reasoning" looks like the strongest.
Root cause
resolveEffortGlyph in apps/web/src/components/chat/EffortGlyph.tsx derives both the bar count and the fill from array position, assuming ascending order with the off level first:
const startsAtOff = OFF_LEVELS.has(levels[0]!.id); // L28
const count = startsAtOff ? levels.length - 1 : levels.length; // L29
// ...
const index = levels.findIndex((option) => option.id === current); // L34
filled: startsAtOff ? index : index + 1, // L38For a descending list that ends in none, both assumptions fail:
levels[0]isxhigh, sostartsAtOffisfalse. The off level is counted as an ordinary level (count = 4instead of 3) and can never map to 0 filled.indexincreases as effort decreases, sofilledis inverted.
Built-in providers are unaffected because their descriptors are hardcoded ascending (low, medium, high, xhigh, …), which is why this only surfaces for agents that advertise their own order via ACP Registry. The picker menu renders that advertised order too, so its menu reads high→low while built-in providers read low→high.
Suggested fix
Either:
- Rank by level id instead of position — map ids to a canonical rank (
off/none<minimal<low<medium<high<xhigh), count only non-off levels, and returnfilled = 0when the current level is an off level. Order-independent, and keeps working for any order an agent advertises. This is the safer minimal fix. - Normalize the advertised choices when building the select descriptor for ACP / ACP Registry providers, so the glyph and the menu order match built-in providers. This also removes the menu-order inconsistency.
A regression test with a descending […, "none"] descriptor would cover it.
Impact
Minor bug or occasional failure — persistent and misleading, but no functional failure.
Version or commit
Desktop 0.1.12; source read at 387d1c170b22578f8d890bc22750eda357606397.
Environment
Windows 10 (10.0.19044), T3 Code (Beta) desktop 0.1.12, provider via ACP Registry, model Qwen4-Max.
Workaround
Set the composer effort display to Word instead of Bars ("Show reasoning effort in the composer as its name, such as High, or as bars"; persisted as effortDisplay: "label"). The word label is correct — only the bar glyph is wrong. Reading the menu's text label is also reliable.
Activity