Repository navigation
fix(models): warn when configured names are absent from server catalogs - #169708
Conversation
Keep declarations selectable and reuse successful discovery for list, Doctor, and status diagnostics. Preserve local model aliases and invalidate advisory facts when configured references change. Refs #39811.
|
🦞👀 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 changesThis PR warns when successful server catalogs omit configured model IDs and recomputes those warnings after configuration reload. Example: Ollama lists qwen3:8b while the configured default is ollama/qwen3:8bb.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR adds useful catalog diagnostics absent from current main, and no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherProvider discovery supplies server listings to the prepared catalog owner, which compares current configuration and publishes advisories to CLI and Doctor consumers. flowchart LR
A[Provider servers] --> B[Provider discovery]
B --> C[Retained catalog inventory]
D[Current configuration] --> E[Prepared catalog projection]
C --> E
E --> F[Gateway model catalog]
F --> G[CLI and Doctor diagnostics]
Technical reviewBest possible solution: Land the shared advisory while keeping broader config-validation and fallback-visibility work with the canonical issue. Do we have a high-confidence way to reproduce the issue? Current-main source lacks server-membership advisories for configured IDs; the supplied Ollama run demonstrates the repaired diagnostics and reload behavior. Is this the best way to solve the issue? The existing catalog owner is the right boundary: retain successful listings, derive warnings from current references, and preserve custom models and provider-owned matching rules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ab11e1f5d81b. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +383, Tests +546, Docs +41. Total +970 across 49 files. Added test files: 3. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 (7 earlier review cycles)
Reviewed October 12, 2026, 7:09 AM ET / 11:09 UTC (Revision 8). |
|
@clawsweeper re-review Both P2 findings are fixed in d02d938: all direct bundled callers forward configured references, and membership uses the same four ID fields as model projection. The registered Baseten and alternate-ID regressions failed before the fixes and now pass. Full-branch independent review is clean. The PR body includes the inherited phone-layout CI failure reproduced on the exact tested main base. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…gs (openclaw#169708) * fix(models): warn when configured names are absent from server catalogs Keep declarations selectable and reuse successful discovery for list, Doctor, and status diagnostics. Preserve local model aliases and invalidate advisory facts when configured references change. Refs openclaw#39811. * fix(models): preserve warnings for empty and namespaced catalogs * fix(models): preserve declaration-compatible status grouping * fix(models): show catalog warnings in Doctor lint and JSON * style(models): normalize local-provider imports * fix: preserve configured references across live model catalogs * fix(models): refresh catalog advisories after config reload Retain successful server listing evidence and derive missing configured IDs from the current catalog projection. Preserve provider alias and endpoint matching without reacquiring unchanged inventory. Keep model validity and availability advisory-only.\n\nRegression covers correcting and reintroducing an Ollama model typo through the prepared Gateway reload owner. * style(models): use the catalog reference copy convention * test(models): accept retained catalog evidence in provider contracts * test(lmstudio): cover retained catalog evidence
Related: #39811. Thanks @LindalyX-Lee for the report and @dsantoreis for the earlier catalog-validation proposal in #40355.
What Problem This Solves
Configured model typos can be invisible in diagnostics, and correcting or introducing a typo on hot reload can leave catalog warnings stale.
User Impact
models list,models status, and Doctor warn when a successful server listing omits a configured ID, with a pull/download-or-correct-the-name next step. Correctingollama/qwen3:8bbtoollama/qwen3:8bclears the warning on hot reload; reversing the edit restores it. Custom/offline declarations remain valid and retain their existing availability and fallback behavior. Offline servers do not generate missing-ID warnings.JSON/plain stdout remains usable. List JSON includes
providerOutcomes.unlistedConfiguredModelIds; Doctor preserves its read-only auth behavior, execution gate, and existing warning exit status. No config, dependency, schema, or migration changes.Why This Change Was Made
Provider discovery retains successful raw server listings before model-kind filtering, including empty and embedding-only listings. The prepared catalog projection derives advisories from current configured references and that retained evidence. Config-only reloads therefore need no additional provider requests. Ollama and LM Studio own their alias and endpoint rules; shared OpenAI-compatible listings use exact IDs. Obsolete discovery-time reference forwarding has been removed.
The advisory remains separate from entitlement and availability. Production growth supports the retained evidence and diagnostics pipeline; nearby cleanup removes obsolete forwarding rather than adding another cache owner.
Evidence
The exact two-direction prepared-runtime regression failed on the original PR code, then passed after the fix. It also asserts zero catalog-worker calls during either config-only reload. Final rerun: 2 passing cases, 127.01s wrapper wall / 30.93s Vitest.
Native Ollama 0.40.3, real
qwen3:8b, isolated state/config and Gateway port 19620: the same Gateway PID 93935 remained alive for all three rows. Only the initial list command refreshed discovery; edits changed onlyagents.defaults.modeland the Gateway acknowledged hot reload.ollama/qwen3:8bbollama/qwen3:8bollama/qwen3:8bbCommands used
pnpm openclaw --profile fix-169708:models list --refresh --jsoninitially, thenmodels list --json,models status --json,doctor --lint --only core/doctor/model-references --severity-min info --json,config validate --json, andagent --session-key agent:main:catalog-hot-reload --message 'Reply with exactly: catalog reload works. Do not use tools.' --json --timeout 180.The live run is bound to
b128d4d3558f240c17cd9bab390aa42f3fb89810; subsequent changes are equivalent reference-copy spelling for lint and companion-test expectations. The isolated Gateway was stopped; shared Ollama was left running. Earlier real-entry-point proof also covered offline diagnostics and fallback behavior. LM Studio and generic OpenAI-compatible paths have production-boundary regression coverage; native live inference proof is Ollama.218 focused owner/SDK/provider tests passed across nine files. Another 104 companion tests pass across Ollama thinking discovery, Synthetic catalog, and MiniMax profile/auth behavior. Companion expectations now allow retained private catalog evidence while preserving their actual contracts; Synthetic still checks exact empty-provider behavior and the unfiltered server ID. The companion run exposed six MiniMax stale assertions before the correction; the final MiniMax file passes 85 tests in 83.78s wrapper wall / 56.97s Vitest. The preceding three-file run took 153.46s wrapper wall and passed all Ollama/Synthetic cases. The final four-file owner/SDK/provider run passed 116 tests in 212.93s wrapper wall. Tests use
node scripts/run-vitest.mjs <files> --maxWorkers=1; no added sleeps, polling, or per-test Gateway boots.Full build passed in 440.28s (earlier full build 643.64s). Core/extension production types, agent and SDK test types, extension test types, scoped lint, max-lines/line-cap/assertion-safety/timeout/mock ratchets, config docs, plugin inventory, SDK exports/surface, and plugin boundaries passed on the production fix. Companion lint, test types, and ratchets also pass. Final independent Codex autoreview is scoped-clean through P2 on the current head. No model-facing prompt/tool text changed.
Full PR: production +610/-227 (net +383), tests +558/-12, docs +42/-1. This repair lane: production +144/-104 (net +40), tests +193/-80, docs +22/-11. The additional production lines retain successful server evidence and preserve vendor-specific matching while removing obsolete reference plumbing; the clean fix could not be made line-neutral without collapsing distinct owner responsibilities.
Current head:
b58a1e597eea86601ab193fc2b728116900b64ca. Exact-head CI and ClawSweeper results are recorded below. This PR is not being landed by the repair lane.CI subsequently found seven LM Studio companion assertions that still rejected the additive listing callback or expected optional successful empty discovery to disappear. The setup assertions now protect their auth/base URL/quiet fields without freezing private callback metadata; the catalog test checks retained empty evidence while the public advisory helper remains quiet. Both files pass all 49 cases, 30.27s wrapper / 22.47s Vitest. No additional production changes. Lint, extension test types, and required ratchets pass again.
ClawSweeper reviewed exact head
b58a1e597eea86601ab193fc2b728116900b64ca: Findings None; Before merge None. Independent Codex autoreview is scoped-clean through P2 on that head.Exact-head CI run 38237049197 tests synthetic merge
024774c3f394b9a99354ef5762b0c88f9d79fb0dwith main parent38f5412c097e80170c4cffa19182c63e493c1bf7. The provider bundle and extension lint pass. Two inherited failures are reproduced on that exact main parent:checks-node-compact-small-1omitssrc/config/sessions/transcript-entry-anchor.tsfrom the wrapper extraction inventory (both eager-import cases fail, 12.63s wall);checks-node-changed-compact-large-13-1fails the managed cron conversation workspace case (expected ok, received error; 65.34s wall, 1 failed/1 passed/5 skipped). The operator cron case also failed in CI but passed in the local baseline replay. Commands:node scripts/run-vitest.mjs test/scripts/eager-import-closure.test.ts --maxWorkers=1 -t 'keeps the PR wrapper inventory|resolves wrapper package exports'andnode scripts/run-vitest.mjs src/cron/isolated-agent/run.session-workspace-authority.test.ts --maxWorkers=1 -t '(operator|managed) conversation workspace'. CI completed with only these two inherited test-job failures and the derivativeopenclaw/ci-gatefailure; all other required CI jobs passed or skipped. The branch remains open for the lead to review and land.