openclaw - ✅(Solved) Fix configure wizard: models block is append-only — stale/delisted model entries never pruned [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#80347Fetched 2026-05-11 03:15:48
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
2
Timeline (top)
commented ×2cross-referenced ×1

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.

Root Cause

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.

Fix Action

Workaround

Manually edit openclaw.json and remove stale models: entries, then validate JSON. Backup first.

PR fix notes

PR #80366: fix(configure): allow pruning stale provider models

Description (problem / solution / changelog)

Summary

  • include same-provider configured allowlist entries that are missing from the current model catalog in provider-scoped configure picker options
  • include those stale configured entries in the scoped write set, so unselecting them prunes only that provider's dead entries while preserving unrelated providers
  • add a regression test covering the OpenRouter stale-model shape from #80347

Fixes #80347.

Real behavior proof (required for external PRs)

Behavior or issue addressed: Provider-scoped openclaw configure allowlist cleanup omitted same-provider configured model keys that disappeared from the current provider catalog, so stale delisted entries stayed in agents.defaults.models forever.

Real environment tested: Local OpenClaw checkout on branch fix/80347-configure-stale-models, running the real promptModelAllowlist and applyModelAllowlist code paths with a local config matching the OpenRouter stale-model shape from #80347. The API key in the proof config/output is a redacted test value and no provider request was sent.

Exact steps or command run after this patch: node --import tsx /private/tmp/openclaw-80347-proof.mjs

Evidence after fix: Terminal output from the command above:

picker options: openrouter/meta-llama/llama-3.3-70b:free [Llama 3.3 70B · ctx 125k · alias: llama] | openrouter/elephant-alpha [configured (not in catalog)]
initial values: openrouter/meta-llama/llama-3.3-70b:free | openrouter/elephant-alpha
operator selection: openrouter/meta-llama/llama-3.3-70b:free
selection result: {"models":["openrouter/meta-llama/llama-3.3-70b:free"],"scopeKeys":["openrouter/meta-llama/llama-3.3-70b:free","openrouter/elephant-alpha"]}
models after configure: anthropic/claude-sonnet-4-6 | openrouter/meta-llama/llama-3.3-70b:free
stale model present after configure: false

Observed result after fix: The stale same-provider key openrouter/elephant-alpha is shown in the picker as configured (not in catalog), is included in scopeKeys, and is removed after the operator leaves it unselected. The unrelated Anthropic allowlist entry remains present.

What was not tested: I did not run an interactive terminal openclaw configure session against a live OpenRouter account; the proof exercises the underlying configure picker/apply path directly with a local config and redacted credentials.

Verification

  • pnpm test src/commands/model-picker.test.ts src/commands/configure.gateway-auth.prompt-auth-config.test.ts
  • pnpm exec oxfmt --check --threads=1 src/flows/model-picker.ts src/commands/model-picker.test.ts CHANGELOG.md
  • git diff --check
  • pnpm check:changed

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/commands/model-picker.test.ts (modified, +59/-0)
  • src/flows/model-picker.ts (modified, +14/-1)
RAW_BUFFERClick to expand / collapse

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

  1. Run openclaw configure and add several model providers over time
  2. Some of those models become delisted by the upstream provider (e.g., OpenRouter removes or renames models)
  3. Uncheck/remove those models from the configure wizard's multi-select
  4. Observe that the models: block in openclaw.json still 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-alpha
  • openrouter/healer-alpha
  • openrouter/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:

  1. Prune entries that are no longer offered by the upstream provider, OR
  2. Flag stale entries visually so operators can choose to remove them, OR
  3. At minimum, provide a --cleanup / --prune option that scans the models: 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix configure wizard: models block is append-only — stale/delisted model entries never pruned [1 pull requests, 2 comments, 3 participants]