Repository navigation
fix(models): Gateway model picker keeps retired Qwen Token Plan models after discovery succeeds - #191609
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. What this changesStop default model lists from restoring static fallback rows after the provider’s account inventory has been accepted. Example: Qwen Token Plan discovery accepts auto, deepseek-v4-pro, glm-5.3, qwen3.7-plus, and qwen3.8-max.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a documented catalog-membership bug still present on current main; no actionable correctness or security findings remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared catalog view combines published discovery facts with configured and static rows before Gateway consumers apply visibility, availability, and account projections. flowchart TD
A[Provider discovery] --> B[Published catalog snapshot]
C[Configuration and static rows] --> D[Shared catalog view]
B --> D
D --> E[Gateway visibility and account projection]
E --> F[Model list consumers]
Technical reviewBest possible solution: Land the focused shared-view fix so accepted discovery controls automatic membership while explicit configuration and retained selections remain intact. Do we have a high-confidence way to reproduce the issue? Current-main source shows the unconditional fallback reintroduction, and supplied built Gateway output demonstrates the same failure against a controlled HTTPS discovery endpoint; no target code was executed during this read-only review. Is this the best way to solve the issue? This is the smallest complete repair: consume accepted discovery membership at the existing view owner, preserve explicit rows, and leave discovery acceptance and request authority with their current owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f68e832179c1. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +10, Tests 0, Docs +3. Total +13 across 3 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 (1 earlier review cycle)
Reviewed November 2, 2026, 10:28 PM ET / November 3, 2026, 03:28 UTC (Revision 2). |
Built Gateway and CLI before/after proofExact candidate 54baa14, pinned main 586f576. Both were source-built and executed in secretless Node 24.22.1 Linux Docker, with independent task-owned config, state and workspace directories. Each exact binary printed its resolved config and SQLite database paths. A local HTTPS OpenAI-compatible fixture stood in for the documented Qwen Token Plan global/CN endpoints. A task CA and supported managed CONNECT proxy kept TLS verification enabled and routed only those two hostnames to the fixture. Recorded The primary accepted inventory was exactly: The ordinary Gateway Every row below was observed in two independent runs per build: Controls and normal entry points
Focused checks and simplification43/43 tests passed across the shared catalog view, runtime config-stamp and Gateway configured-static suites; changed TypeScript lint reported 0 warnings/errors. The identical accepted-provider @jerome-queck's original commit is preserved. The provider Set no longer needs a map intermediate and is allocated only when default-view accepted origins require it. Whole PR: production +12/-2 (14 gross), tests +23/-23 (net 0), docs +3/-0. No auth, discovery-acceptance, endpoint, public-type or storage implementation changed. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed in b57d02c. Thanks @jerome-queck. The model picker no longer shows retired fallback models after discovery. |
…s after discovery succeeds (openclaw#191609) fix(models): don't add retired fallback models back after discovery succeeds Fixes openclaw#191360. After a provider's model discovery succeeded, the default Gateway model picker still added the retired static fallback models back, so the list showed models the account no longer offered. As documented, an accepted discovery result now replaces the seeds. Manually declared models and a selected retained model are kept, and the fallback list is still used while discovery is pending. Auth, discovery acceptance, endpoints, public types and storage are unchanged. Evidence: built Gateway and CLI in secretless Node 24.22.1 Linux Docker with authenticated local HTTPS discovery returning five models. Main returned 10 default rows twice; with this change it returned exactly five twice, and the CLI all-view stayed at five. Manual-declaration, retained-selection, pending-discovery, same-origin last-good and cross-origin controls passed. Details: openclaw#191609 (comment). Thanks @jerome-queck. Co-authored-by: Ayaan Zaidi <[email protected]>
Fixes #191360
What Problem This Solves
The default Gateway model picker re-adds static fallback models after account discovery has already published a ready inventory. For Qwen Token Plan, that produces ten rows when the account advertises five, while
models list --all --refreshcorrectly returns five.At the shared view owner, use the already-accepted discovery origins to stop merging those providers' fallback rows into the default view. Explicitly configured and retained selected rows remain listed. Providers without accepted discovery still get fallback rows, and eligible last-good inventories retain their existing origin scope.
Preserves @jerome-queck's original commit. Simplification avoids the map intermediate and allocates the provider Set only when a default view needs it. The regression shares the existing committed-row/configured/retained fixture with zero net test-line growth. No auth, discovery-acceptance, endpoint, public-type or storage implementation changes; manifest-status projection is a separate concern and unchanged.
Evidence
Built Linux Gateway/CLI captures and controls, exact candidate
54baa14a110982085d9c2a5898d610136b5999abversus main586f5766569997816efdf795eaaf535f552627a7:models.listand CLIgateway callreturn 10 rows, 2/2; candidate returns exactly five live rows, 2/2. Gateway all-view and offline CLImodels list --all --refreshreturn five on both builds.manual-only, 2/2. A previously selectedglm-5remains in its scoped configured view, 2/2 per build.Merge danger
Two-way door: revert restores the previous view membership; no migration or persisted-state rewrite. Blast radius is default model-catalog consumers after a provider has accepted discovery, including eligible last-good inventory. An incorrect identity check could hide useful fallback choices; explicit/manual and retained selections, unaccepted-provider fallback, and origin isolation are covered. The catalog/discovery/auth owners and request authority remain unchanged.