bug: Shift+Tab thinking cycle is a no-op when model has no reasoning support #206
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Pressing Shift+Tab to cycle thinking levels appears to do nothing when the active gateway session uses a model with
reasoning: false. The cycle is mathematically a no-op.Root Cause
In
packages/cli/src/tui/app.tsx(Shift+TabuseInputhandler):When
availableThinkingLevelsis["off"](single element), modulo wraps back to index 0 on every keypress. The handler emitsset:thinking { level: "off" }on every Shift+Tab. The gateway accepts it, changes nothing, and echoes back the same state. Infinite no-op.Steps to Reproduce
reasoning: true)Expected Behaviour
Guard against single-element arrays: if
availableThinkingLevelscontains only"off", display a status message that thinking is unsupported for the current model rather than silently cycling.Affected File
packages/cli/src/tui/app.tsx— Shift+TabuseInputhandler