fix(auxiliary): preserve auto fallback model after auth failure#50984
Open
aunitt wants to merge 1 commit into
Open
fix(auxiliary): preserve auto fallback model after auth failure#50984aunitt wants to merge 1 commit into
aunitt wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resolve_provider_client("auto")already lets_resolve_auto()select a fallback-chain model when the selected main provider is unavailable. However, the public wrapper then filled a missingmodelargument from_read_main_model()before returning the auto resolution result.That meant a Codex-auth failure path could correctly resolve OpenRouter/Gemini Flash internally, but still hand back the stale main model (
gpt-5.5) to the caller.This keeps the existing provider-specific defaulting behaviour, but skips that prefill for
provider == "auto"so_resolve_auto()can preserve the model it selected.Why
Follow-up to #36759 / #50954. The dangerous #36759 leak path is mostly fixed by the fallback-policy changes, but this narrower wrapper regression still reproduced on current
origin/main:resolve_provider_client("auto", main_runtime={...openai-codex/gpt-5.5...})returnedgpt-5.5after the OpenRouter fallback selectedgoogle/gemini-3-flash-preview.Tests