feat(providers): re-query effort options after model switch - #225
Conversation
Review — request changesThe ACP adapter half is sound: The renderer 1. Unsupported models keep a stale chip ( 2. Startup / model switch can wipe a valid saved effort (
The one new renderer test is happy-path only (empty catalog, non-empty model probe, chip shows). It never passes a saved effort. Do not merge until 1 and 2 are fixed and tested. #224 (composer picker collapse) is a subset of this branch and is landing separately. Skip list: #223 stays open as requested. |
Main reworked `applyModel` to report a `ModelApplyOutcome` (for the model-unavailable notice and the drift watch) while this branch used its return value to carry the selectors the agent sends back with a switch. Kept both: the outcome's `applied` variant now carries `refreshed`, so the effort re-query reads it without losing the notice or the drift watch. The adapter advertises both efforts and models, and publishes both. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The effort chip released `loaded` as soon as the kind's catalog resolved, but that catalog is probed against the default model. For a model whose levels only the per-model query knows, the reset effect saw a saved effort missing from the generic list and cleared it before the model's own answer arrived — losing the setting this control exists to keep. Withhold `loaded` until the per-model probe settles when there is a model to probe. An effort no list advertises is still cleared, just later. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
OpenCode advertises its effort selector per-model over ACP (reasoning-capable models only), so the default-model catalog probe hides the chip even with a reasoning model selected. This adds a model-aware lookup plus turn-time refresh, all through ACP. pnpm verify green.