feat: model + effort switcher (dynamically fetched from the CLI) - #20
Merged
Conversation
Add a toolbar switcher (next to the agent switch) for the session model and reasoning effort, plus a 'Model · effort' status-bar item after the agent name. The model list, display names, descriptions, and each model's valid effort levels are fetched at runtime from the Claude CLI's stdio control-protocol `initialize` response (response.response.models) — nothing is hardcoded. Sonnet correctly omits xhigh; Haiku omits effort entirely. Effort's fixed enum is not enumerable via the protocol, so it's read per-model from supportedEffortLevels. FlyCrys spawns a fresh `claude --resume` process per message, so a switch needs no session reset: the chosen --model/--effort apply on the next message with history preserved. A lightweight off-thread probe at workspace init populates the switcher; the choice persists per workspace and self-heals on load if a saved model/effort is no longer offered. - cli: AgentSpawnConfig.effort → --effort; ModelInfo + probe_models() - workspace_config: persist model_override + effort (backward-compatible) - agent_panel: switcher menu (parameterized GActions), spawn wiring, set_models - workspace: status label, eager probe thread, persistence callback
This was referenced Jun 12, 2026
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.
What
A toolbar switcher next to the agent switch for the session model and reasoning effort, plus a `Model · effort` item in the status bar right after the agent name.
![placement: toolbar button next to agent switch; status bar shows Agent · Model · Effort]
Nothing is hardcoded
The model list — values, display names, descriptions, and each model's valid effort levels — is fetched at runtime from the Claude CLI's stdio control-protocol `initialize` response (`response.response.models`). Verified against the installed CLI:
The effort menu rebuilds itself from the selected model's `supportedEffortLevels`; Haiku shows no effort section. Effort's fixed enum isn't enumerable via the protocol, so it's read per-model rather than listed statically.
No session reset on switch
FlyCrys already spawns a fresh `claude … --resume ` process per message. So a model/effort switch needs no reset: the chosen `--model`/`--effort` apply on the next message, conversation preserved via `--resume`. (The CLI also exposes a `set_model` control request for live processes, but we don't need it given this architecture.)
Behavior
Scope
Checks
fmt ✅ · clippy `-D warnings` (lib+bins) ✅ · tests ✅ (105) · `--model default` accepted by the CLI ✅