fix(models): filter models list by configured providers in replace mode [AI-assisted]#94914
fix(models): filter models list by configured providers in replace mode [AI-assisted]#94914aniruddhaadak80 wants to merge 2 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 4:44 AM ET / 08:44 UTC. Summary PR surface: Source +27, Tests +116. Total +143 across 3 files. Reproducibility: yes. at source level: current main's default Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land one canonical fix that filters the default replace-mode model list, preserves explicit browse views, has type-clean regression coverage, and includes real CLI proof. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main's default Is this the best way to solve the issue? Mostly yes, but not mergeable yet. The browse bypass addresses the prior over-filtering concern, but the new tests do not typecheck and the PR still lacks real after-patch CLI proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 53bd4dde6c00. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +27, Tests +116. Total +143 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
Review history (1 earlier review cycle)
|
e90e0b5 to
f829437
Compare
|
@clawsweeper re-review - Rebased onto main, added browse bypass context, resolved default list leak, and verified all tests pass on Windows. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Thanks for the detailed tests. Closing this duplicate in favor of #94735 for #94705. The selected branch gates the exact authenticated-catalog append that leaks providers, preserves explicit browse views, and has live CLI proof. This branch broadens filtering across configured/default row sources, still has invalid test fixtures in the type lane, and lacks equivalent live proof. |
Closes #94705
What Problem This Solves
The output of openclaw models list was not filtered when models.mode is set to "replace" with a restricted list of providers, leading to a default list leak where unauthorized provider models were shown.
Why This Change Was Made
To correctly enforce the models.mode "replace" configuration. The fix applies provider allowlisting to the shared model-list row filtering when in replace mode, but explicitly bypasses this restriction when the user explicitly requests full catalog browsing (e.g., using --all or a specific provider filter).
User Impact
Users relying on models.mode "replace" will correctly only see models from their configured models.providers. Explicit browsing (--all) remains unaffected.
Evidence
Unit tests added and passed on Windows.