fix: add resilient fallback policy for user model overrides#80181
Conversation
|
Codex review: found issues before merge. Reviewed July 3, 2026, 11:45 PM ET / 03:45 UTC. Summary PR surface: Source +57, Tests +179, Docs 0. Total +236 across 14 files. Reproducibility: yes. for the source-level behavior: current main returns Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Maintainers should choose one user-selected model fallback contract, then land one rebased implementation with resolver behavior, schemas, docs, tests, and runtime proof aligned to that decision. Do we have a high-confidence way to reproduce the issue? Yes for the source-level behavior: current main returns Is this the best way to solve the issue? Unclear as-is: the strict-default opt-in policy is a plausible safer shape than changing every user selection, but it is not the best merge path until maintainers approve the product/API contract and the branch is rebased against current main. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d68f877ac3e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +57, Tests +179, Docs 0. Total +236 across 14 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
|
c323428 to
dbd835c
Compare
Co-Authored-By: Cha <[email protected]> via OpenClaw
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: add resilient fallback policy for user model overrides This is item 1/1 in the current shard. Shard 5/22. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Summary
Describe the problem and fix in 2–5 bullets:
userOverrideFallbackPolicy: "resilient"onagents.defaults.modeland per-agent chat model config, with schema/types/help/labels/docs and fallback-resolution tests.strict; auto-selected model overrides and configured agent primaries keep their existing fallback behavior; non-chat model config schemas remain unchanged.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
resilient, while the defaultstrictbehavior still returns no fallbacks.fix/user-override-fallback-policy.[]for user overrides wheneverhasSessionModelOverridewas true.Root Cause (if applicable)
For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write
N/A. If the cause is unclear, writeUnknown.resolveEffectiveModelFallbackstreated every non-auto session model override as authoritative and returned an empty fallback list without a config escape hatch.Regression Test Plan (if applicable)
For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write
N/A.src/agents/agent-scope.test.ts,src/config/zod-schema.agent-defaults.test.tsUser-visible / Behavior Changes
Users can set
userOverrideFallbackPolicy: "resilient"underagents.defaults.modelor an individual agent's chatmodelblock. The default is stillstrict.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
agents.defaults.model.userOverrideFallbackPolicy: "resilient"Steps
agents.defaults.model.fallbacks.agents.defaults.model.userOverrideFallbackPolicy: "resilient".Expected
Actual
Evidence
Attach at least one:
Verification commands run:
codex review --base origin/mainresult:Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) Yes, optional new config fieldYes/No) NouserOverrideFallbackPolicy: "resilient"only when user-selected models should keep configured fallback chains.Risks and Mitigations