Repository navigation
feat(models): show each provider's recommended models first in pickers - #167370
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 2:49 PM ET / 18:49 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR prioritizes each provider’s recommended models and places other choices behind an All models disclosure in browser and terminal pickers. Example: Open the Anthropic model picker
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review The previous TUI finding is fixed, and no remaining actionable defect was found. The supplied browser proof supports the change; current main does not yet provide this presentation. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Gateway publishes available model choices to browser, terminal, and text-command clients. The shared catalog orders those choices, while each picker controls how users browse and select them. flowchart TD
A[Hosted provider recommendations] --> C[Shared catalog ordering]
B[Visible models and current selection] --> C
C --> D[Gateway model list]
D --> E[Browser and terminal pickers]
E --> F[Recommended choices and All models]
E --> G[Search across all choices]
Technical reviewBest possible solution: Keep recommendation ranking in the shared catalog owner and retain full-inventory search and explicit disclosure in each picker. Do we have a high-confidence way to reproduce the issue? Not applicable to a feature proposal; the inspected before/after images directly demonstrate the existing browsing problem and changed presentation. Is this the best way to solve the issue? Yes: the change consumes existing curated recommendations through the shared ordering owner and keeps current selections and full-list access intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9324ed61ca56. Provenance checked
TestingProof path: shipped entry point. Added test files: 2. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +191, Tests +78, Docs +11. Total +280 across 20 files. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles) |
Before / afterCaptured against a copy of the production catalog from before the curated list (#167338), so some recommended picks differ from today's list.
|
|
Landed in d81169b. Model pickers now lead each provider with its catalog |
openclaw#167370) ## What Problem This Solves Model pickers list every model a provider serves in catalog order, so the handful OpenClaw actually recommends are buried among older and niche models. The hosted catalog already carries each provider's `recommendedModels` (openclaw#166737), but no picker reads it. ## User Impact In the Control UI chat and New Session pickers, each provider group shows Default, the current model, then that provider's recommended models in list order. Everything else sits behind a collapsed **All models (N)** row inside the group. Search still matches every model, and the disclosure is hidden while searching. - Terminal `/models` lists the current model, every provider's recommended models, and all models of providers that recommend none, then an **All models (N)** row holding the rest. Enter on it reveals them in place. Typing a search matches every model. - Text `/models <provider>` pages list the current model, then the recommended models, then the rest. They are already paged and end with `All: /models list <provider> all`, so they get the new order but no new structure. - Providers with no recommendations, and installs without a downloaded v2 catalog, keep today's lists with no disclosure. - Recommended ids that the provider no longer serves, or that the picker view hides, are skipped. Channel button menus (Telegram/Discord interactive `/models`), settings model dropdowns and the CLI onboarding picker are unchanged. ## Why This Change Was Made - **One ordering rule.** `orderModelCatalogForPicker`, the picker-order owner from openclaw#157869, now ranks each provider's rows by that provider's `recommendedModels` from the active hosted catalog, ahead of the provider-owned remainder. It keeps the selected model first. `models.list` and text `/models` both read through this owner, so every surface gets the same order. - **One additive protocol field.** `models.list` rows (and the `models.snapshot` built from them) gain an optional `recommended: true`, set by the same ranking. Clients need it to know where the collapsed section starts. No version bump or capability: released clients ignore an unknown optional field, and the Control UI ships with its Gateway. - **Surface rendering only.** The chat picker splits each group into lead and **All models** rows and reuses the provider-group toggle and DOM search (search ignores the disclosure). The TUI's searchable list gains generic collapsed rows plus an expander row. No config, stored data or catalog publication changes. No overlap with Pash/Sarah changes. ## Evidence Real isolated Gateways (fresh state dirs, loopback ports, fake provider keys, a deny-all egress proxy) served a local copy of the production v2 catalog (1,048 models across 44 providers) through `models.catalogRefresh.url`. Base is `origin/main` at fdd707b. The candidate is this branch. The same harness drove the real Control UI in Chromium and the real `openclaw tui` in tmux on both. ### Web chat picker Before: Anthropic lists all 11 models in catalog order.  After: Default, then the recommended Fable 5.1, Sonnet 5.5 and Haiku 5.5, then **All models (7)** collapsed.  After, with **All models (7)** expanded:  A provider without a current model: Google before and after.   Search reaches collapsed models (Haiku 4.5 is not recommended):  ### Chat `/models anthropic`   ### TUI `/models` These are renders of the real tmux pane text, not pixel screenshots. Before: 43 rows, Anthropic first in catalog order.  After: 13 current and recommended rows, then **All models (30)**.  After Enter on **All models (30)**, the collapsed rows appear in place. Selection lands on the first one.  ### Checks - New regression `leads each provider with its hosted-catalog recommendations after the selected model` in `src/agents/model-catalog-visibility.test.ts`. It fails with `model-catalog-visibility.ts` restored to main and passes on the branch, along with the other 26 cases in that file. - Existing picker suites pass unchanged: `models-list-result` (openai-routes, configured-static, runtime-choices), `commands-models` and `commands-models-order`, TUI `searchable-select-list` and `tui-command-handlers`, and UI `chat-model-picker`. - `pnpm tsgo:core`, `pnpm tsgo:ui`, `pnpm lint:ui:styles` and `pnpm ui:i18n:baseline` (no baseline change) pass. - Control UI budget against the base build: startup JS +4 B gzip, chat boot JS +378 B, boot CSS +40 B. Base and branch both exceed the local startup-JS limit by the same margin (373,662 B vs 373,666 B). That margin predates this change; the hosted Control UI performance job is the gate. - `codex review` (gpt-6-astra) against `origin/main`: two rounds, no findings. Not covered: native macOS/iOS/Android pickers (they ignore the new field), and channel button menus, which keep their alphabetical callback offsets. ## Merge danger Two-way door. A revert restores the previous order and drops the optional row field. Nothing is written, migrated or published. If the change is wrong, the impact is presentation only: Control UI, TUI and text `/models` users would see a provider's models in the wrong order or partly collapsed, while search still reaches every model. Co-authored-by: Ayaan Zaidi <[email protected]>
## What Problem This Solves Fixes chat model pickers showing every model when an upgrade is newer than the last hosted catalog publication. ## User Impact Compatible stored recommendations survive an upgrade. The picker still shows the current/default models and recommended choices first, with the rest behind **All models**. A recommended ID cannot restore an unavailable model. No UI code, configuration, or stored data changes. ## Why This Change Was Made The build timestamp is a freshness cutoff for remote model rows and prices, not for the publisher-owned recommendation list. Keep those older rows and prices rejected while retaining recommendations in the same captured catalog generation. Match recommendations against the rows actually served. This preserves the paired row/pricing adoption and in-flight generation rules from #158000, and the publisher ownership and unserved-ID filtering from #166737, #167370, and #167989. The [catalog publication workflow](https://github.com/openclaw/catalog/blob/main/.github/workflows/publish.yml) runs independently of releases and preserves the previous timestamp when catalog content has not changed. #158000 also records published-driver upgrade proof where the hosted catalog was older than the candidate build. No overlap with Pash/Sarah changes. ## Evidence - Focused overlay, pricing, and catalog visibility suites: 56 tests passed, including unchanged stale row/pricing rejection. - The new regression fails on baseline `da65be64a3216fa78420099e41b9182c6ef29515` because the served row has no recommendation, and passes with this fix. - The regression uses a valid v2 catalog and proves only currently served recommended rows match; stale rows and both pricing maps stay absent. - Bounded Codex review found one existing snapshot fixture to migrate; it is fixed and its 12-test consumer suite passes. The simplification pass retained one snapshot owner, no UI changes, and no new stored state. - Isolated real Gateways, same eight synthetic OpenAI models and the same valid stored v2 catalog dated October 2 (older than both builds): baseline shows all eight; candidate shows Default + the served recommendation, with **All models (6)** collapsed. The retired recommended ID never appears. - Screenshots below are from those desktop runs, cropped only to omit the private sidebar. No provider call or production profile was used. ### Before  ### After  ## Merge risk Two-way door: reverting restores the previous read behavior; this change writes no state and needs no migration. The affected consumers are model pickers using hosted recommendations. Remote rows and prices retain their existing freshness cutoff. Co-authored-by: Ayaan Zaidi <[email protected]>
…172622) ## What Problem This Solves Fixes chat model pickers showing every model when an upgrade is newer than the last hosted catalog publication. ## User Impact Compatible stored recommendations survive an upgrade. The picker still shows the current/default models and recommended choices first, with the rest behind **All models**. A recommended ID cannot restore an unavailable model. No UI code, configuration, or stored data changes. ## Why This Change Was Made The build timestamp is a freshness cutoff for remote model rows and prices, not for the publisher-owned recommendation list. Keep those older rows and prices rejected while retaining recommendations in the same captured catalog generation. Match recommendations against the rows actually served. This preserves the paired row/pricing adoption and in-flight generation rules from openclaw#158000, and the publisher ownership and unserved-ID filtering from openclaw#166737, openclaw#167370, and openclaw#167989. The [catalog publication workflow](https://github.com/openclaw/catalog/blob/main/.github/workflows/publish.yml) runs independently of releases and preserves the previous timestamp when catalog content has not changed. openclaw#158000 also records published-driver upgrade proof where the hosted catalog was older than the candidate build. No overlap with Pash/Sarah changes. ## Evidence - Focused overlay, pricing, and catalog visibility suites: 56 tests passed, including unchanged stale row/pricing rejection. - The new regression fails on baseline `2a342126f558d86ee2a171bd5c3aa90b474b057d` because the served row has no recommendation, and passes with this fix. - The regression uses a valid v2 catalog and proves only currently served recommended rows match; stale rows and both pricing maps stay absent. - Bounded Codex review found one existing snapshot fixture to migrate; it is fixed and its 12-test consumer suite passes. The simplification pass retained one snapshot owner, no UI changes, and no new stored state. - Isolated real Gateways, same eight synthetic OpenAI models and the same valid stored v2 catalog dated October 2 (older than both builds): baseline shows all eight; candidate shows Default + the served recommendation, with **All models (6)** collapsed. The retired recommended ID never appears. - Screenshots below are from those desktop runs, cropped only to omit the private sidebar. No provider call or production profile was used. ### Before  ### After  ## Merge risk Two-way door: reverting restores the previous read behavior; this change writes no state and needs no migration. The affected consumers are model pickers using hosted recommendations. Remote rows and prices retain their existing freshness cutoff. Co-authored-by: Ayaan Zaidi <[email protected]>











What Problem This Solves
Model pickers list every model a provider serves in catalog order, so the handful OpenClaw actually recommends are buried among older and niche models. The hosted catalog already carries each provider's
recommendedModels(#166737), but no picker reads it.User Impact
In the Control UI chat and New Session pickers, each provider group shows Default, the current model, then that provider's recommended models in list order. Everything else sits behind a collapsed All models (N) row inside the group. Search still matches every model, and the disclosure is hidden while searching.
/modelslists the current model and every provider's recommended models, then an All models (N) row. Enter on it reveals the rest in place. Typing a search matches every model./models <provider>pages list the current model, then the recommended models, then the rest. They are already paged and end withAll: /models list <provider> all, so they get the new order but no new structure.Channel button menus (Telegram/Discord interactive
/models), settings model dropdowns and the CLI onboarding picker are unchanged.Why This Change Was Made
orderModelCatalogForPicker, the picker-order owner from fix(models): keep current choices on the first picker page #157869, now ranks each provider's rows by that provider'srecommendedModelsfrom the active hosted catalog, ahead of the provider-owned remainder. It keeps the selected model first.models.listand text/modelsboth read through this owner, so every surface gets the same order.models.listrows (and themodels.snapshotbuilt from them) gain an optionalrecommended: true, set by the same ranking. Clients need it to know where the collapsed section starts. No version bump or capability: released clients ignore an unknown optional field, and the Control UI ships with its Gateway.No config, stored data or catalog publication changes.
Evidence
Real isolated Gateways (fresh state dirs, loopback ports, fake provider keys, a deny-all egress proxy) served a local copy of the production v2 catalog (1,048 models across 44 providers) through
models.catalogRefresh.url. Base isorigin/mainat 8958390. The candidate is this branch. The same harness drove the real Control UI in Chromium and the realopenclaw tuiin tmux on both.Web chat picker
Before: Anthropic lists all 11 models in catalog order.
After: Default, then the recommended Fable 5.1, Sonnet 5.5 and Haiku 5.5, then All models (7) collapsed.
After, with All models (7) expanded:
A provider without a current model: Google before and after.
Search reaches collapsed models (Haiku 4.5 is not recommended):
Chat
/models anthropicTUI
/modelsThese are renders of the real tmux pane text, not pixel screenshots.
Before: 43 rows, Anthropic first in catalog order.
After: 13 current and recommended rows, then All models (30).
After Enter on All models (30), the collapsed rows appear in place. Selection lands on the first one.
Checks
leads each provider with its hosted-catalog recommendations after the selected modelinsrc/agents/model-catalog-visibility.test.ts. It fails withmodel-catalog-visibility.tsrestored to main and passes on the branch, along with the other 26 cases in that file.models-list-result(openai-routes, configured-static, runtime-choices),commands-modelsandcommands-models-order, TUIsearchable-select-listandtui-command-handlers, and UIchat-model-picker.pnpm tsgo:core,pnpm tsgo:ui,pnpm lint:ui:stylesandpnpm ui:i18n:baseline(no baseline change) pass.codex review(gpt-6-astra) againstorigin/main: two rounds, no findings.Not covered: native macOS/iOS/Android pickers (they ignore the new field), and channel button menus, which keep their alphabetical callback offsets.
Merge danger
Two-way door. A revert restores the previous order and drops the optional row field. Nothing is written, migrated or published. If the change is wrong, the impact is presentation only: Control UI, TUI and text
/modelsusers would see a provider's models in the wrong order or partly collapsed, while search still reaches every model.