Repository navigation
fix(cli): resolve plugin-catalog metadata for configured models list rows - #115190
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 8:38 AM ET / 12:38 UTC. ClawSweeper reviewWhat this changesThe branch makes configured Merge readinessKeep this PR open for normal maintainer review. The supplied PR evidence describes a focused display-metadata correction with live before/after CLI output and targeted regression coverage, but the current-main source and merge-result audit could not be completed because read-only shell inspection was blocked by the sandbox. Likely related people: steipete is the implementation author and has the clearest current context for the intended catalog precedence; historical ownership remains unconfirmed. Priority: P2 Review scores
Verification
How this fits togetherThe model-list CLI combines configured model references, explicit provider configuration, and prepared plugin-catalog entries into display rows. The resulting rows show operators each model's modalities, context budget, and configured/default/fallback role without changing runtime model selection. flowchart LR
A[OpenClaw configuration] --> C[Configured model references]
B[Prepared plugin catalog] --> D[Metadata precedence]
C --> D
D --> E[Configured model rows]
E --> F[Models list CLI output]
B --> G[All catalog rows]
G --> F
Before merge
Agent review detailsSecurityNone. PR surfaceSource +23, Tests +111. Total +134 across 3 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or refresh the merge result, then confirm the shared prepared-catalog snapshot preserves explicit configured-provider precedence and the reported CLI output before merging. Do we have a high-confidence way to reproduce the issue? No independent high-confidence reproduction was completed because sandbox restrictions blocked read-only repository inspection and execution. The PR nevertheless provides a concrete isolated configuration, baseline CLI output, after-fix output, and focused regression-test path. Is this the best way to solve the issue? Unclear pending a current-main and merge-result audit. The stated explicit-config → prepared-catalog → placeholder precedence is a narrow maintainable direction if it matches the existing prepared-catalog contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 74954fd931e0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
openclaw models list(the default configured view) andopenclaw models list --alldisagree about plugin-catalog models referenced fromagents.defaults.model.fallbacks. Withfallbacks: ["kimi/k3"]and the bundledkimiprovider plugin authenticated:The configured view synthesized a placeholder row (
input: ["text"],contextWindow: DEFAULT_CONTEXT_TOKENS = 200_000) for any configured/default/fallback ref that is not declared incfg.models.providers— which is exactly the case for plugin-catalog models. Display-only: the runtime resolves the real catalog entry (contextTokenBudget: 1048576on a liveopenclaw agent --local --model kimi/k3run).Why This Change Was Made
The cheap default view emits configured rows first via
appendConfiguredRowswithout a model registry, sotoFallbackConfiguredListModelfell through to the hardcoded placeholder. The real catalog row was appended later byappendAuthenticatedCatalogRowsfrom the prepared catalog snapshot, but by then the key was already inseenKeysand got skipped.Fix:
appendConfiguredModelRowSourcesnow loads the prepared model catalog snapshot once up front and threads it into bothappendConfiguredRows(which resolves configured refs against it before falling back to the placeholder) andappendAuthenticatedCatalogRows(which previously did its own load) — one catalog load per listing, same committed generation for every row source. Precedence per row: explicitcfg.models.providersdefinition → prepared catalog entry → placeholder, so user-authored provider metadata stays authoritative. The two duplicated inline snapshot-load blocks inlist.rows.tsare folded into a sharedloadListModelCatalogSnapshot.User Impact
openclaw models listnow shows the same context window and input modalities as--allfor plugin-catalog models taggeddefault,fallback#N,image, orconfigured. Previously users could conclude a fallback model had a 200k text-only budget when the runtime actually uses the full catalog entry (1M+ multimodal forkimi/k3).Evidence
src/commands/models/list.configured.test.ts— drivesresolveConfiguredEntries→appendConfiguredModelRowSourceswith a plugin-catalogkimi/k3infallbacks; assertstext+image/1_048_576/fallback#1, that explicitmodels.providersmetadata beats a conflicting catalog row, that unknown refs keep the placeholder, and that the snapshot loads exactly once. Fails against unfixed code with the reported symptom.OPENCLAW_STATE_DIR, kimi plugin enabled, kimi auth present):kimi/k3 text 200k fallback#1— bug reproducedkimi/k3 text+image 1049k fallback#1in bothmodels listandmodels list --allnode scripts/run-vitest.mjs src/commands/models/list— 8 files, 72 tests greennode scripts/run-vitest.mjs src/commands/models.list.e2e.test.ts— 21 tests greentsgocore + test-src typechecks green; oxfmt/oxlint clean