Skip to content

configure wizard: models block is append-only — stale/delisted model entries never pruned #80347

@wherewolf87

Description

@wherewolf87

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions