Skip to content

fix(cli): inspect the agent model catalog without readding excluded rows - #142367

Merged
obviyus merged 1 commit into
mainfrom
refactor/capability-model-catalog
Sep 8, 2026
Merged

obviyus merged 1 commit into
mainfrom
refactor/capability-model-catalog

Conversation

@obviyus

@obviyus obviyus commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #136257, #141859.

What Problem This Solves

Fixes an issue where model inspection commands showed manifest models excluded from the selected agent’s prepared catalog. One configuration listed three models normally but 292 through inference inspection.

Why This Change Was Made

Use the prepared catalog directly for model listing, inspection and provider listing. Remove the extra manifest load and merge while preserving selected-agent scope, sorting, model details and provider flags.

User Impact

Inspection commands agree with model listing and retain authored metadata, empty output and existing errors.

Consumers: inference model list, inspect and provider commands use prepared inventory.

Evidence

Compiled command-line checks returned the same three models, or four with an authored row, and matching provider counts. Excluded-model inspection and unknown-agent selection retained their errors; configuration bytes were unchanged. Three regressions failed before the fix and 76 focused tests passed. No external inference or operator credentials were used.

@obviyus obviyus self-assigned this Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 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 cli CLI command changes size: S maintainer Maintainer-authored PR labels Sep 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 2:22 PM ET / 18:22 UTC (Revision 3).

ClawSweeper review

What this changes

Makes model listing, inspection, and provider counts use the selected agent’s prepared catalog, with regression coverage and CLI documentation.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still rebuilds the excluded inventory. No actionable correctness or security defects were found, and the reported compiled-CLI observations cover the changed behavior.

Priority: P2
Reviewed head: c971ed594a2f637be291eb19c369503cfba4446b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level simplification with relevant CLI observations and regression coverage; no blocking defect was identified.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body reports compiled list, inspect, and providers commands against an isolated DeepSeek setup using the verified candidate test merge: inventory matches the canonical catalog, authored details survive, excluded entries fail inspection, and config bytes remain unchanged.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body reports compiled list, inspect, and providers commands against an isolated DeepSeek setup using the verified candidate test merge: inventory matches the canonical catalog, authored details survive, excluded entries fail inspection, and config bytes remain unchanged.
Evidence reviewed 9 items Current main still needs the repair: The fetched main revision loads the prepared catalog, independently plans manifest rows, and unions both inventories. This can restore rows excluded by the prepared owner.
Narrow inspection repair: The introduced patch retains explicit agent resolution and read-only catalog acquisition, then sorts the returned entries without rebuilding inventory. The three command consumers retain their existing output and error handling.
Catalog filtering belongs to the shared owner: Manifest catalog construction filters eligible plugins before planning rows. Supplemental inventory also distinguishes runtime declarations from discovered models. The removed CLI merge bypassed these owner-level decisions.
Findings None None.
Security None None.

How this fits together

OpenClaw’s model catalog combines eligible plugin models and configured model details for an agent. The inference CLI reads that catalog to display models, inspect individual entries, and summarize providers.

flowchart TD
  A[Agent selection and configuration] --> B[Prepared model catalog]
  C[Eligible plugin models] --> B
  B --> D[Sort catalog entries]
  D --> E[Model listing]
  D --> F[Single model inspection]
  D --> G[Provider counts and state]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -14, Tests +16, Docs +2. Total +4 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 15 -14
Tests 1 42 26 +16
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 45 41 +4

Review metrics

None.

Technical review

Best possible solution:

Keep model inspection as a read-only projection of the canonical agent catalog, preserving configured details and existing provider-state reporting.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: a prepared catalog that excludes a manifest row is expanded again by current main’s inspection helper. The PR reports the corresponding compiled-CLI discrepancy; this review did not execute it.

Is this the best way to solve the issue?

Yes. Removing the redundant merge reuses the existing catalog owner and preserves selection, sorting, details, and command handling without adding another policy path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8128b418f050.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports compiled list, inspect, and providers commands against an isolated DeepSeek setup using the verified candidate test merge: inventory matches the canonical catalog, authored details survive, excluded entries fail inspection, and config bytes remain unchanged.

Label justifications:

  • P2: Repairs misleading CLI model inventory and provider counts without changing inference execution or persisted configuration.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body reports compiled list, inspect, and providers commands against an isolated DeepSeek setup using the verified candidate test merge: inventory matches the canonical catalog, authored details survive, excluded entries fail inspection, and config bytes remain unchanged.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports compiled list, inspect, and providers commands against an isolated DeepSeek setup using the verified candidate test merge: inventory matches the canonical catalog, authored details survive, excluded entries fail inspection, and config bytes remain unchanged.

Evidence

What I checked:

  • Current main still needs the repair: The fetched main revision loads the prepared catalog, independently plans manifest rows, and unions both inventories. This can restore rows excluded by the prepared owner. (src/cli/capability-cli/model.ts:62, 8128b418f050)
  • Narrow inspection repair: The introduced patch retains explicit agent resolution and read-only catalog acquisition, then sorts the returned entries without rebuilding inventory. The three command consumers retain their existing output and error handling. (src/cli/capability-cli/model.ts:59, c971ed594a2f)
  • Catalog filtering belongs to the shared owner: Manifest catalog construction filters eligible plugins before planning rows. Supplemental inventory also distinguishes runtime declarations from discovered models. The removed CLI merge bypassed these owner-level decisions. (src/agents/model-catalog.ts:377, c971ed594a2f)
  • Existing catalog access contract: loadPreparedModelCatalog returns the resolved snapshot entries. This is an OpenClaw-owned catalog projection; neither the changed inspection path nor the DeepSeek proof scenario requires a Codex harness contract. (src/agents/prepared-model-catalog.ts:490, c971ed594a2f)
  • Observable regression coverage: The table-driven regression checks list, inspect, and providers against an empty prepared catalog with a nonempty manifest inventory. Existing selected-agent cases now also check context window, reasoning, and input details; nearby tests preserve provider state and unknown-agent rejection. Tests were inspected, not executed during this read-only review. (src/cli/capability-cli.test.ts:1183, c971ed594a2f)
  • Compiled CLI behavior evidence: The captured PR body reports a real compiled-CLI comparison: a DeepSeek-only setup previously returned 292 infer rows versus 3 catalog rows; afterward both returned 3, or 4 with an authored row. It also records matching provider counts, excluded-model and unknown-agent errors, preserved model details, empty output, and unchanged config bytes. Candidate build 0ba229893b23519b0ed2c74f1e40173be31f4277 is the host-verified test merge containing the exact head. These are reported runtime observations, not reviewer-executed tests. Captured context identity: 174214510e0067e3efa48b1062bd447d2ead64287406a5bda32a3311d75d87b4. (c971ed594a2f)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-08T17:27:30.621Z sha c971ed5 :: blocked before merge. :: none
  • reviewed 2026-09-08T17:59:46.216Z sha c971ed5 :: needs maintainer review before merge. :: none

@obviyus
obviyus marked this pull request as ready for review September 8, 2026 17:32
@obviyus
obviyus merged commit a92c15a into main Sep 8, 2026
228 checks passed
@obviyus
obviyus deleted the refactor/capability-model-catalog branch September 8, 2026 18:24
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 8, 2026
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Landed the canonical model inspection repair.

Proof: Compiled CLI checks confirm matching catalog/list membership, correct provider counts, preserved authored metadata, and the expected excluded-model/unknown-agent errors. All 76 focused tests pass. Independent source-blind acceptance passed six clauses and one fresh nonce command. Exact-head CI 34257732624, attempt 1, passed.

Before After
With only DeepSeek enabled, models list --all returns 3 rows but infer model list returns 292 across 44 providers. Both lists contain the same 3 eligible models and provider counts match.
The CLI's second manifest merge restores excluded inventory. List, inspect, and provider summaries use the selected agent's prepared catalog directly.

Authored model details, agent selection, sorting, empty output, and saved config bytes are preserved. The existing status-help wording also passes. No live inference or credential-readiness claim is made.

Fresh exact-head local review found no code or security issue (proof A, patch B).

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 9, 2026
…ows (openclaw#142367)

Use the selected agent's prepared catalog for model listing, inspection, and provider counts. Remove the independent manifest merge that restored excluded models while preserving authored metadata, agent selection, sorting, and existing errors.

Verified with compiled CLI baseline/candidate observations, focused regression tests, and exact-head CI.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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