fix(models): respect models.mode=replace in 'openclaw models list' output#94735
fix(models): respect models.mode=replace in 'openclaw models list' output#94735Monkey-wusky wants to merge 0 commit into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: #103103 is the open, proof-positive, maintainer-labeled landing path for the same bug, uses the cleaner ownership boundary, includes regression coverage, and preserves the original contributor credit. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Land the canonical replacement with its direct config check, focused merge/replace tests, explicit browsing regressions, and contributor credit, then close the linked bug issue after merge. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Land the canonical replacement with its direct config check, focused merge/replace tests, explicit browsing regressions, and contributor credit, then close the linked bug issue after merge. Do we have a high-confidence way to reproduce the issue? Yes at source level: the authenticated-catalog append path explains the leaked rows, and both PRs provide live or focused evidence for the affected default and explicit browsing paths. Is this the best way to solve the issue? No. The behavior is correct, but the canonical replacement is the better fix because it keeps policy at the row source, reads canonical config directly, and includes focused upgrade-sensitive regressions. Security review: Security review cleared: The two TypeScript changes do not alter secrets, permissions, dependencies, downloads, workflows, or other security-sensitive execution paths. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against c69a75f69787. |
|
Auto re-trigger CI |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
@steipete Hi, I saw you self-assigned this PR 2 days ago — just checking in on the progress. If the current approach looks good, I can add focused regression tests to help move this forward. Or if you're evaluating across the sibling PRs, happy to adjust. Thanks! |
Replace the stale fork PR with the reviewed fix on current main. Refs: #94735 Co-authored-by: 毛宇豪0668001457 <[email protected]>
Replace the stale fork PR with the reviewed fix on current main. Refs: #94735 Co-authored-by: 毛宇豪0668001457 <[email protected]>
Replace the stale fork PR with the reviewed fix on current main. Refs: #94735 Co-authored-by: 毛宇豪0668001457 <[email protected]>
Replace the stale fork PR with the reviewed fix on current main. Refs: #94735 Co-authored-by: 毛宇豪0668001457 <[email protected]>
Replace the stale fork PR with the reviewed fix on current main. Refs: #94735 Co-authored-by: 毛宇豪0668001457 <[email protected]>
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
bb6a70e to
bf44072
Compare
|
@steipete Hi Pete, this PR has been marked stale and is about to be auto-closed by barnacle. I noticed you created #103103 ("fix(models): honor replace mode in list output") which ClawSweeper referenced as the canonical replacement. However, this PR (#94735) already has proof: supplied + proof: sufficient and is ready for maintainer look, while #103103 still has status: needs proof. If the approach here is viable, could we land this one (or merge the proof into #103103)? Happy to rebase again if needed — just rebased to resolve the Let me know what you prefer. Thanks! |
bf44072 to
a537bee
Compare
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
a537bee to
e2e394e
Compare
What Problem This Solves
When
models.mode: "replace"is set with a restrictedmodels.providerslist,openclaw models liststill shows models from built-in provider catalogs and authenticated-but-unconfigured providers. The replace-mode restriction incorrectly blocked--alland--providerbrowsing inenableSourcePlanCascade, making it impossible to discover models outside the configured provider list.Fixes #94705.
Changes
src/commands/models/list.list-command.ts: AddedmodelsModeReplaceflag; fixedenableSourcePlanCascadeto not be blocked by replace mode, so--alland--providerbrowse work regardless ofmodels.modesrc/commands/models/list.rows.ts:appendAuthenticatedCatalogRowsskips processing when in replace modeEvidence
Before (broken)
models listin replace mode shows models from built-in catalogs and unconfigured providers — incorrectmodels list --allin replace mode is blocked — catalog browsing impossiblemodels list --provider <name>in replace mode is blockedAfter (fixed)
models listshows only configured provider models (3 models) ✅models list --allshows full catalog (40+ models) ✅models list --provider xiaomishows provider-filtered catalog (3 models) ✅The replace-mode restriction is now scoped to
appendAuthenticatedCatalogRowsonly — filtering at display time rather than blocking catalog loading.Real Behavior Proof
Tested against a live OpenClaw gateway with
models.mode: "replace"and a configuredzteprovider.Test 1: Default
models list(replace mode)Only configured provider models appear (3 models):
Test 2:
models list --all(replace mode)All catalog models appear (40+ models), proving
--allis NOT blocked by replace mode:Test 3:
models list --provider xiaomi(replace mode)Provider-filtered browsing works, showing Xiaomi catalog models:
Summary
models list(replace mode)models list --all(replace mode)models list --provider xiaomi(replace mode)