feat(shared,desktop): Fable model + reasoning-effort support for agent launches
Merged
KI
5mo ago+300+300+012345678901234567890123456789-4-4-0123456789
Summary
- Add
{ id: "fable", label: "Fable" }to theclaudepreset inAGENT_MODEL_SUPPORT, so the workspace-create model picker offers Fable for Claude Code and launches pass--model fable. - Add reasoning-effort support across the builtin CLI agents: a new
AGENT_EFFORT_SUPPORTcatalog +buildAgentEffortArgsinpackages/shared/src/agent-models.ts, threaded throughworkspaces.create→agents.runon the host service, with an effort picker (persisted per preset, same contract as the model picker) in the workspace-create form.
How It Works
- Effort flags were verified against each installed CLI (
--helpoutput / binary validators):claude --effort(low, medium, high, xhigh, max)amp --effort(none, minimal, low, medium, high, xhigh, max)copilot --effort(low, medium, high, xhigh)pi --thinking(off, minimal, low, medium, high, xhigh)mastracode --thinking-level(off, low, medium, high, xhigh)codexhas no dedicated flag; effort rides a config override-c model_reasoning_effort=<v>via the entry'seffortValuePrefix- gemini, opencode, cursor-agent, and droid expose no effort control on their interactive launch commands (droid only has it on
droid exec), so they have no entry and render no picker.
buildAgentEffortArgshas the same degrade-to-default contract asbuildAgentModelArgs: unknown preset or effort id →[]→ CLI default, never a broken launch.- The renderer reuses
AgentModelSelectfor the effort dropdown and persists the last selection per preset under a new localStorage key (useAgentEffortPreference, mirroringuseAgentModelPreference).
Manual QA Checklist
-
claude --model fable --effort low -p …accepted both flags; response self-identified as Claude Fable 5 (claude-fable-5) - Workspace-create form shows the effort picker only for presets with an entry (claude, amp, codex, mastracode, pi, copilot)
- Effort selection persists across modal reopen and host switches
- Launch with "Default" effort omits the flag entirely
Testing
bun test agent-modelsinpackages/shared— 20 pass (new suites forAGENT_EFFORT_SUPPORT,getAgentEffortSupport,buildAgentEffortArgsincl. the codex prefix shape, plus a fable registry assertion)bun turbo run typecheck --filter=@superset/shared --filter=@superset/host-service --filter=@superset/desktop— cleanbiome checkon all changed files — clean- Live CLI test of the exact argv Superset generates for Claude Code (see QA above)
Notes
fableis the short alias the Claude Code CLI accepts after--model, matching the existingopus/sonnet/haikuentries. Listed first as the most capable tier.- The superset chat agent has no effort entry — chat metadata carries only a model id today.
- codex does not validate
model_reasoning_effortclient-side (a bogus value is echoed into the session header), so the curated list is the only guard on that path — same as for models.
Summary by CodeRabbit
- New Features
- Expanded the Claude preset model picker with an additional option.
- Added “reasoning effort” selection for supported v2 agents in the new workspace flow, including persistence of the last choice.
- Changes
- Workspace and agent run requests now accept an optional reasoning effort value and apply it during execution.
- Bug Fixes
- Improved validation so only supported effort values are used.
- Tests
- Added/extended coverage for effort support and argument building.