Skip to content

fix(models): warn when configured names are absent from server catalogs - #169708

Merged
steipete merged 10 commits into
mainfrom
fix/model-id-catalog-warning
Oct 12, 2026
Merged

steipete merged 10 commits into
mainfrom
fix/model-id-catalog-warning

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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. Correcting ollama/qwen3:8bb to ollama/qwen3:8b clears 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 only agents.defaults.model and the Gateway acknowledged hot reload.

Configured default List / status / Doctor Config validation Agent result
ollama/qwen3:8bb Missing-ID warning accepted —
hot reload to ollama/qwen3:8b Warning cleared accepted “catalog reload works.”
hot reload back to ollama/qwen3:8bb Warning returned accepted —

Commands used pnpm openclaw --profile fix-169708: models list --refresh --json initially, then models list --json, models status --json, doctor --lint --only core/doctor/model-references --severity-min info --json, config validate --json, and agent --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 024774c3f394b9a99354ef5762b0c88f9d79fb0d with main parent 38f5412c097e80170c4cffa19182c63e493c1bf7. The provider bundle and extension lint pass. Two inherited failures are reproduced on that exact main parent: checks-node-compact-small-1 omits src/config/sessions/transcript-entry-anchor.ts from the wrapper extraction inventory (both eager-import cases fail, 12.63s wall); checks-node-changed-compact-large-13-1 fails 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' and node 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 derivative openclaw/ci-gate failure; all other required CI jobs passed or skipped. The branch remains open for the lead to review and land.

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime commands Command implementations agents Agent runtime and tooling extensions: lmstudio extensions: ollama size: XL labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: Diagnostics do not identify the typo using the server listing.
  • After: List, status, and Doctor show recovery guidance; correcting the default to ollama/qwen3:8b clears the warning after hot reload.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong shipped-entry-point proof and no actionable findings; overall scope remains a partial solution to the linked validation request.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied native Ollama run exercises shipped list, status, Doctor, config validation, and agent commands in isolated state: warnings appear for qwen3:8bb, clear for qwen3:8b, and return after a second hot reload, with successful inference between edits; later changes preserve the exercised production behavior.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: A configured model typo can remain invisible in diagnostics or leave a stale warning after correction.
Reason: The maintainer-authored advisory provides actionable diagnostics without rejecting custom models, while intentionally leaving the linked issue's broader expectations open.

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
Reviewed head: b58a1e597eea86601ab193fc2b728116900b64ca

Before merge

None.

Findings

None.

Agent review details

How this fits together

Provider 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]
Loading

Technical review

Best 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

  • Retained inventory and current-config projection keeps the original intent (1bb76a2: Retain complete discovery and recompute current membership without another catalog request.)
  • Strict catalog outcomes keeps the original intent (d141dc6: Preserve real failures and successful empty results while keeping external helpers advisory.)
  • Gateway-owned CLI catalog reads keeps the original intent (89fcceb: Passive browsing consumes the selected Gateway's published inventory; explicit refresh owns discovery.)
  • LM Studio registered discovery keeps the original intent (30c1dab: Registered refresh queries the server while preserving authored rows and the public helper's explicit-model behavior.)
  • Local-provider alias matching keeps the original intent (1e82025: Ollama onboarding shares model-name matching while preserving omitted latest-tag aliases.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 1bb76a2 adds src/agents/prepared-model-runtime.catalog-projection.ts:16 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1bb76a2e1894; files: src/agents/prepared-model-runtime.catalog-projection.ts)

PR surface

Source +383, Tests +546, Docs +41. Total +970 across 49 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 31 610 227 +383
Tests 15 558 12 +546
Docs 3 42 1 +41
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 49 1210 240 +970

Review metrics

Metric Value Why it matters
Production versus tests Production +610/-227; tests +558/-12 Growth retains raw server evidence, provider-specific matching, reload projection, and shared diagnostics; tests cover distinct acquisition, reload, transport, and Doctor contracts.
Additive public contracts 1 optional SDK hook; 1 optional protocol field Provider matching remains optional, and only derived advisory IDs cross the public catalog boundary.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This improves model diagnostics without changing execution eligibility or blocking existing configurations.
  • merge-risk: 🚨 compatibility: The patch expands provider SDK and catalog-response contracts; the maintainer-authored direction accepts the documented additive changes.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (7 earlier review cycles)
  • reviewed 2026-10-12T07:22:00.763Z sha b501a6c :: needs changes before merge. :: [P2] Forward configured references from every bundled direct caller | [P2] Match the identity fields accepted by the existing projection
  • reviewed 2026-10-12T07:37:59.617Z sha b501a6c :: needs changes before merge. :: [P2] Forward configured references from every bundled direct caller | [P2] Match the identity fields accepted by the existing projection
  • reviewed 2026-10-12T08:47:01.768Z sha d02d938 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T09:01:29.877Z sha d02d938 :: needs changes before merge. :: [P2] Invalidate advisories through the provider-retention fingerprint
  • reviewed 2026-10-12T10:07:38.862Z sha 5b261b3 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T10:27:23.248Z sha 3df1a62 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T10:41:06.981Z sha b58a1e5 :: needs maintainer review before merge. :: none

Reviewed October 12, 2026, 7:09 AM ET / 11:09 UTC (Revision 8).

@steipete steipete added the ci:no-fail-fast Keep all selected CI matrix jobs running after failures on the next PR run. label Oct 12, 2026
@steipete
steipete marked this pull request as ready for review October 12, 2026 07:32
@steipete

Copy link
Copy Markdown
Contributor Author

@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.

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete steipete self-assigned this Oct 12, 2026
@steipete
steipete merged commit 1bee6ae into main Oct 12, 2026
153 of 159 checks passed
@steipete
steipete deleted the fix/model-id-catalog-warning branch October 12, 2026 17:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui ci:no-fail-fast Keep all selected CI matrix jobs running after failures on the next PR run. commands Command implementations docs Improvements or additions to documentation extensions: baseten Extension: baseten extensions: lmstudio extensions: minimax extensions: ollama extensions: synthetic gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant