Repository navigation
Feed the launcher model picker from the server catalog - #909
Conversation
Fetches api/agents/model-options once (the web UI's source) and offers it per vendor, falling back to the curated list when a vendor is absent or the fetch fails, so a launch is never blocked. The Default and Custom rows are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR Summary by QodoPopulate launcher model picker from server catalog
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
Code Review by Qodo
1.
|
#900) The endpoint needs auth, so a signed-out start left the catalog empty; it now also loads on the sign-in-completed signal. Expected misses (offline/non-success) stay quiet; an unexpected fault is logged instead of hidden behind the curated fallback. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A generation counter drops a slow earlier fetch whose result lands after a newer load, so overlapping startup and per-sign-in reloads can't leave a stale snapshot. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
One lock spans the entry increment and the post-fetch check+OnNext, so a newer load cannot publish between an older load's check and its own publish. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Closes #900 — AI-2718
What & why
The desktop launcher's model picker offered a curated list for only Claude and Codex; every other vendor showed just Default + Custom. It now fetches
GET api/agents/model-options— the same server catalog the web UI's dropdown reads — and offers it per vendor, so the desktop reaches web-UI parity. No kcap-server change: the endpoint already exists, and the app already has an authenticated HTTP read path. There is no context-window selector because the web UI has none (context window is display-only).Where to look
ServerVendorModelCatalogfetches once and pushes anIObservable;HomeViewModel.ModelChoicesFor(vendor)prefers the fetched list and falls back toHostedHarnessCatalog's curated one per vendor, so an empty or unreachable catalog never blocks a launch. The launcher flyout and the agent chip both read through it. Fetch is best-effort: signed-out / offline / non-success leaves the fallback in place.Verification
dotnet build Capacitor.slnx→ 0 warnings; CLIdotnet publish -c Release→ no IL2026/IL3050. Tests: ServerVendorModelCatalogTests 2/2 (publish on success; empty snapshot on null/throw), HomeViewModelTests 62/62 (new: server catalog preferred, curated fallback, empty when neither has the vendor), HomeViewSmokeTests 13/13, AppStartupTests 24/24.