feat(desktop): discover Codex models and configure picker visibility
What & why
Codex's fixed model list can miss models offered by the installed CLI. Discover the catalog through Codex app-server after its initialization handshake, read all model/list pages with includeHidden: true, and derive model identifiers and reasoning options from the returned metadata.
Add Settings → Agent commands → Codex controls for which models appear in the desktop picker. Save those choices separately from provider-hidden flags, preserve catalog ordering, and keep a valid effective selection when a model disappears or the active choice is deselected. Reuse the existing Codex executable, launch environment, authentication, RPC transport, and preference storage conventions; remove the manually maintained Codex catalog.
Mobile consumes the same discovery endpoint with its existing launch preferences. Desktop visibility preferences remain local to the desktop. The installed Codex ACP adapter rejects provider-hidden models, so chat pickers exclude those models while terminal pickers can include them.
Context: Discord model picker discussion.
Attribution
The Codex model discovery integration was adapted from Kiet Ho's existing commit 40241abb73079feab41ae27a79d3ea075ae94b70 — feat(agents): read Codex's model list from the installed CLI.
This PR builds on that discovery work with persisted desktop picker selections, provider-hidden metadata handling, reasoning defaults, and related UI and launch validation. Credit for the original discovery implementation belongs to Kiet Ho; it is not claimed as entirely new work by this PR's author.
How I tested it
bun run lintandbun run typecheckpassed.bun run check:i18npassed strict compilation for all 18 locales.bun run test --filter=!@superset/agent-setuppassed all 29 tasks, including 9,059 desktop tests and 2,711 host-service tests.- After the final cleanup, focused shared/discovery tests passed: 93 tests, 426 assertions.
- Real desktop UI: discovered 11 Codex models; changed selections; checked ordering; restarted the app and confirmed persistence; checked last-choice protection and active-model recovery. Actual Codex process arguments included the selected model and catalog default reasoning effort. A real Codex chat returned the requested proof response.
- Controlled app-server catalogs through the real Settings/host path: pagination, errors, empty results, recovery, account-environment changes, disappearing models, and preservation of saved preferences.
- Verified the same saved hidden-model preference appears in the terminal picker and is excluded from the chat picker.
The standard bun run test command is not green: two shell-wrapper tests in @superset/agent-setup also fail from clean HEAD on this Mac because login-shell PATH ordering invokes the installed Claude binary instead of the test binary. The excluded-package run above does not replace that standard check.
Screenshots


Screenshots live on a separate evidence branch in the fork and are not part of this PR's code diff.
Remaining before ready for review
- Resolve the old-host update guard and coordinated minimum host version for the new
agents.listModelsendpoint. Existing remote hosts may not expose it. - Native mobile UI remains unverified; the available mobile account lacks Pro access.
- Real cloud provisioning remains unverified: the isolated sandbox attempt was rejected with HTTP 403 before creating any resources. The branch host-service bundle built locally, but no release or bundle was published.
- No second physical host was exercised. Account-environment edge cases used controlled catalogs, not two real account entitlements.
- A returned catalog can be bundled or cached and does not establish inference entitlement for every model.
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintandbun run typecheckpass (CI fails on lint warnings too) - "Allow edits from maintainers" is checked on this fork PR
- I have signed the CLA (the bot asks on the first PR)
Draft for contributor walkthrough and maintainer discussion; the unresolved items above are not claimed complete.
Summary by cubic
Replaces the hand-maintained Codex model catalog with one discovered from the installed CLI and lets desktop users choose which models the picker shows.
New Features
- Discovers models through the Codex
app-serverhandshake after initialization, paginatesmodel/listwithincludeHidden: true, and caches the catalog per account on the host service. - Adds Settings → Agent commands → Codex controls; desktop saves visibility locally, separate from provider-hidden flags, preserves catalog ordering, and keeps a valid active selection when a model disappears or gets deselected.
- Chat pickers exclude provider-hidden models while terminal pickers can list them; mobile uses the same discovery endpoint with its existing launch preferences.
- Host launch validation accepts models present only in the live catalog, and the manually maintained Codex list is removed.
Migration
- Existing remote hosts must expose the new
agents.listModelsendpoint; the coordinated minimum host version and old-host update guard are not yet resolved.