fix(configure): allow pruning stale provider models#80366
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 1, 2026, 4:06 PM ET / 20:06 UTC. Summary PR surface: Source +13, Tests +59. Total +72 across 2 files. Reproducibility: Do we have a high-confidence way to reproduce the issue? Yes by source inspection: current main scopes cleanup to live filtered catalog keys, so a same-provider configured key missing from the catalog is omitted from scopeKeys and survives applyModelAllowlist. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land this focused configure-picker change after normal CI and maintainer review, keeping pruning limited to same-provider scopeKeys while preserving unrelated provider entries. Do we have a high-confidence way to reproduce the issue? Do we have a high-confidence way to reproduce the issue? Yes by source inspection: current main scopes cleanup to live filtered catalog keys, so a same-provider configured key missing from the catalog is omitted from scopeKeys and survives applyModelAllowlist. Is this the best way to solve the issue? Is this the best way to solve the issue? Yes; extending the existing picker scopeKeys is narrower than adding a new cleanup command or config option, and it reuses the existing scoped apply behavior that preserves unrelated providers. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against eb58c88598f3. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +13, Tests +59. Total +72 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
b4fe53d to
c2a10fe
Compare
c2a10fe to
fe23ea2
Compare
fe23ea2 to
3928922
Compare
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Mossy Crabkin Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Rebased onto current Two conflicts came from
Verified on the rebased head:
|
3928922 to
fe00512
Compare
Repairs a batch of narrow model/provider edge cases: - honor OpenAI and Anthropic base URL environment overrides when provider config does not set an explicit base URL - preserve OpenRouter Anthropic cache retention while stripping unsupported transport options - allow apply_patch for non-OpenAI providers when the tool config otherwise permits it - prune stale same-provider model selections from configure/model picker state - expose GitHub Copilot bundled thinking policy metadata to offline/provider-policy lookups - repair additive SQLite shared-state upgrades for existing databases - keep same-size rotated log readers from reusing stale content in CI tooling Proof: - GitHub PR checks green on exact head 4651490 - Crabbox delegated Blacksmith Testbox tbx_01kt3em5r9vd7g0bnykrff6jdk exited 0 - Focused local Vitest/oxlint/format proof recorded in PR body and land-ready comment Fixes #80347. Fixes #88357. Fixes #45269. Supersedes #74427, #74432, #79370, #79894, #80366, and #88359.
Repairs a batch of narrow model/provider edge cases: - honor OpenAI and Anthropic base URL environment overrides when provider config does not set an explicit base URL - preserve OpenRouter Anthropic cache retention while stripping unsupported transport options - allow apply_patch for non-OpenAI providers when the tool config otherwise permits it - prune stale same-provider model selections from configure/model picker state - expose GitHub Copilot bundled thinking policy metadata to offline/provider-policy lookups - repair additive SQLite shared-state upgrades for existing databases - keep same-size rotated log readers from reusing stale content in CI tooling Proof: - GitHub PR checks green on exact head 4651490 - Crabbox delegated Blacksmith Testbox tbx_01kt3em5r9vd7g0bnykrff6jdk exited 0 - Focused local Vitest/oxlint/format proof recorded in PR body and land-ready comment Fixes openclaw#80347. Fixes openclaw#88357. Fixes openclaw#45269. Supersedes openclaw#74427, openclaw#74432, openclaw#79370, openclaw#79894, openclaw#80366, and openclaw#88359.
Repairs a batch of narrow model/provider edge cases: - honor OpenAI and Anthropic base URL environment overrides when provider config does not set an explicit base URL - preserve OpenRouter Anthropic cache retention while stripping unsupported transport options - allow apply_patch for non-OpenAI providers when the tool config otherwise permits it - prune stale same-provider model selections from configure/model picker state - expose GitHub Copilot bundled thinking policy metadata to offline/provider-policy lookups - repair additive SQLite shared-state upgrades for existing databases - keep same-size rotated log readers from reusing stale content in CI tooling Proof: - GitHub PR checks green on exact head 4651490 - Crabbox delegated Blacksmith Testbox tbx_01kt3em5r9vd7g0bnykrff6jdk exited 0 - Focused local Vitest/oxlint/format proof recorded in PR body and land-ready comment Fixes openclaw#80347. Fixes openclaw#88357. Fixes openclaw#45269. Supersedes openclaw#74427, openclaw#74432, openclaw#79370, openclaw#79894, openclaw#80366, and openclaw#88359.
Repairs a batch of narrow model/provider edge cases: - honor OpenAI and Anthropic base URL environment overrides when provider config does not set an explicit base URL - preserve OpenRouter Anthropic cache retention while stripping unsupported transport options - allow apply_patch for non-OpenAI providers when the tool config otherwise permits it - prune stale same-provider model selections from configure/model picker state - expose GitHub Copilot bundled thinking policy metadata to offline/provider-policy lookups - repair additive SQLite shared-state upgrades for existing databases - keep same-size rotated log readers from reusing stale content in CI tooling Proof: - GitHub PR checks green on exact head 4651490 - Crabbox delegated Blacksmith Testbox tbx_01kt3em5r9vd7g0bnykrff6jdk exited 0 - Focused local Vitest/oxlint/format proof recorded in PR body and land-ready comment Fixes openclaw#80347. Fixes openclaw#88357. Fixes openclaw#45269. Supersedes openclaw#74427, openclaw#74432, openclaw#79370, openclaw#79894, openclaw#80366, and openclaw#88359.
Summary
Fixes #80347.
Real behavior proof (required for external PRs)
Behavior or issue addressed: Provider-scoped
openclaw configureallowlist cleanup omitted same-provider configured model keys that disappeared from the current provider catalog, so stale delisted entries stayed inagents.defaults.modelsforever.Real environment tested: Local OpenClaw checkout on branch
fix/80347-configure-stale-models, running the realpromptModelAllowlistandapplyModelAllowlistcode 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.mjsEvidence after fix: Terminal output from the command above:
Observed result after fix: The stale same-provider key
openrouter/elephant-alphais shown in the picker asconfigured (not in catalog), is included inscopeKeys, 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 configuresession 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.tspnpm exec oxfmt --check --threads=1 src/flows/model-picker.ts src/commands/model-picker.test.ts CHANGELOG.mdgit diff --checkpnpm check:changed