Skip to content

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

Closed

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.

Activity

  1. clawsweeper commented on May 10, 2026

    @clawsweeper
    Contributor

    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

    • Add a screenshot or short recording showing the behavior.
    • Include the exact command, prompt, or workflow that triggered it.
    • Add expected vs actual behavior.

    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:

    • No close action taken because the review did not complete.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 93fd17447abd.

    Label changes

    Label changes:

    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • add clawsweeper:needs-info: Current issue advisory state selects this label.
    • remove P2: Current review triage priority is none.
    • remove clawsweeper:no-new-fix-pr: Current issue advisory state no longer selects this label.
    • remove clawsweeper:source-repro: Current issue advisory state no longer selects this label.
    • remove clawsweeper:linked-pr-open: Current issue advisory state no longer selects this label.
    • remove impact:auth-provider: Current review selected no impact labels.
    • remove issue-rating: 🦞 diamond lobster: Current issue advisory state no longer selects this label.
    Evidence reviewed

    What I checked:

    • failure reason: codex execution failed.
    • codex failure detail: Codex review failed for this issue with exit 1.
    • codex stdout: Per-item Codex failure; continuing with the rest of the shard.

    Likely related people:

    • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. jbetala7 commented on May 10, 2026

    @jbetala7
    Contributor

    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, and pnpm check:changed.

  3. openclaw-barnacle commented on Jun 1, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  4. added
    stale
    on Jun 1, 2026
  5. added
    P2
    impact:auth-provider
    issue-rating: 🦞 diamond lobster
    clawsweeper:source-repro
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    on Jun 1, 2026
  6. removed
    stale
    on Jun 2, 2026
  7. added a commit that references this issue on Jun 3, 2026
    55384bb
  8. locked as resolved and limited conversation to collaborators on Jun 5, 2026
  9. added a commit that references this issue on Jun 10, 2026
    ebffa83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2clawsweeper:linked-pr-openclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:auth-providerissue-rating: 🦞 diamond lobster

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions