feat(ai): discover models from installed tools instead of hand-maintained lists (#1593)
* feat(ai): discover models from installed tools instead of hand-maintained lists
Claude models come from the Agent SDK's supportedModels() against the
installed claude; Codex models from the app-server model/list. Discovery is
lazy (first picker or session), bounded, cached per process, and falls back
to one small static list per provider in @plannotator/core/model-catalog.
Ask AI and the review / Code Tour / Guided Review launchers now share that
one list. Launchers resolve saved picks against it at read time, offer only
the efforts (and fast mode) the selected model supports, and default to the
opus/sonnet aliases (Claude) and the model Codex marks default. Removes the
hand-maintained Claude/Codex launcher catalogs and the Codex rename/retire
migrations. core 0.25.6, ui 0.46.0.
* fix(ai): one shared model resolver that keeps the model family and context window
- resolveModelChoice (core) is now the only resolver: launchers, Ask AI's
client and the AI session endpoint all use it. Order: exact id, the alias
whose resolvedId covers it, the same family's alias, the surface default,
the catalog default. It never moves a pick onto a [1m] id unless the pick
was one.
- Failed discovery is retried: providers' fetchModels reject on failure and
createBestEffortOnce allows a retry after 60s; the client forgets a failed
catalog fetch.
- Launchers fetch only the selected engine's catalog; viewing a saved guide
loads nothing unless it offers Regenerate.
- Job cards label models from the discovered catalog; aliases read
'<Family> (latest)'; a loading row replaces the empty picker.
- Dedupe the deferred-discovery wiring in both ai-runtimes; drop the
redundant modelsLoaded flags.
- HANDOFF.md lists the ui 0.46.0 breaking export removals.
* fix(ai): version numbers in Claude alias labels; drop fast mode for a replaced Codex pick
- Alias rows name the model they resolve to today ("Opus 5.5 (latest)",
"Sonnet 5 (latest)", "Opus 5.5 1M (latest)"), parsed from the SDK's
resolvedModel by claudeModelVersion (the displayName carries no version);
unparseable ids keep the plain label. Every picker, Ask AI and job cards
read the same catalog label.
- When resolution replaces a saved Codex model with a different one, fast
mode is off: a retired pick saved with fast on no longer launches the
replacement with service_tier=fast. M
Michael Ramos committed
e42e0e34767cd10fbff3e19691f8afe61b064fe1
Parent: 2ba4032
Committed by GitHub <noreply@github.com>
on 9/22/2026, 9:18:21 PM