Repository navigation
Description
Summary
The openclaw configure wizard treats the models: block in openclaw.json as an additive registry/alias store. It adds or updates entries when you select a new model, but it never removes entries that have become stale, delisted, or were otherwise removed from the upstream provider's catalog.
Steps to Reproduce
- Run
openclaw configureand add several model providers over time - Some of those models become delisted by the upstream provider (e.g., OpenRouter removes or renames models)
- Uncheck/remove those models from the configure wizard's multi-select
- Observe that the
models:block inopenclaw.jsonstill contains the old entries
Actual Behavior
Stale/delisted model entries persist in the models: block indefinitely. The wizard only adds or updates keys — it never removes them. This is append-only behavior that accumulates dead entries across version upgrades.
Concrete Example
The following OpenRouter models were all delisted by OpenRouter but remained in the models: block of our config:
openrouter/elephant-alphaopenrouter/healer-alphaopenrouter/hunter-alpha
None of these were selected in the configure wizard's multi-select, none were usable as primary or fallback, and all had been removed from OpenRouter's catalog. Yet they persisted in openclaw.json until manually pruned.
Expected Behavior
The configure wizard should:
- Prune entries that are no longer offered by the upstream provider, OR
- Flag stale entries visually so operators can choose to remove them, OR
- At minimum, provide a
--cleanup/--pruneoption that scans themodels:block and removes entries not referenced by any agent's primary/fallback
Impact
- Config bloat:
models:accumulates dead entries over time with no cleanup mechanism - Confusion: operators reviewing their config see model entries that no longer exist
- Manual maintenance burden: operators must hand-edit JSON to clean up stale models
Workaround
Manually edit openclaw.json and remove stale models: entries, then validate JSON. Backup first.
Environment
- OpenClaw version:
2026.5.7(npm) - OS: Ubuntu 24.04.1 WSL2
- Config:
/root/.openclaw/openclaw.json
Prior Art
Issue #70643 (Concurrent writes to openclaw.json produce invalid JSON) is adjacent but different — that covers write safety. This covers the wizard's semantic behavior around stale model lifecycle.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 10, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 2, 2026, 1:08 AM ET / 05:08 UTC.
Summary
Codex review failed: codex execution failed.
Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.
Ways to help us reproduce this
Next step
Review did not complete, so no work-lane recommendation was made.
Review details
Best possible solution:
Retry the Codex review after fixing the execution failure.
Do we have a high-confidence way to reproduce the issue?
Unclear. The review failed before ClawSweeper could establish a reproduction path.
Is this the best way to solve the issue?
Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.
AGENTS.md: unclear because the file could not be read completely.
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 93fd17447abd.
Label changes
Label changes:
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:needs-info: Current issue advisory state selects this label.P2: Current review triage priority is none.clawsweeper:no-new-fix-pr: Current issue advisory state no longer selects this label.clawsweeper:source-repro: Current issue advisory state no longer selects this label.clawsweeper:linked-pr-open: Current issue advisory state no longer selects this label.impact:auth-provider: Current review selected no impact labels.issue-rating: 🦞 diamond lobster: Current issue advisory state no longer selects this label.Evidence reviewed
What I checked:
Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.jbetala7 commentedon May 10, 2026
Opened a fix PR: #80366
It keeps provider-scoped configure cleanup narrow by showing same-provider configured model entries that are missing from the current catalog as
configured (not in catalog), includes them in the scoped write set, and prunes them only when the operator unselects them. Verification in the PR includes the focused picker/configure tests, formatting,git diff --check, andpnpm check:changed.openclaw-barnacle commentedon Jun 1, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
fix: repair model provider edge cases
fix: repair model provider edge cases