Conversation
LeonSGP43
force-pushed
the
fix/switch-model-missing-fallback-chain
branch
from
April 24, 2026 14:55
412169d to
488e8ab
Compare
Contributor
Collaborator
|
Thanks for the contribution, @LeonSGP43! This fix was already merged into Evidence:
This is an automated hermes-sweeper review. Closing as implemented on main. |
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\n- normalize fallback state at the start of AIAgent.switch_model()\n- avoid crashing when lightweight callers or tests invoke switch_model() without the full init path\n- preserve existing fallback-pruning behavior when switching primary providers\n\n## Why\nRecent CI failures across authored PRs include tests/agent/test_minimax_provider.py::TestMinimaxSwitchModelCredentialGuard::test_switch_to_minimax_does_not_resolve_anthropic_token, which crashes with an AttributeError before the actual credential guard can be verified.\n\nThis patch keeps switch_model() robust for those direct-call paths and removes one shared test failure from the current PR backlog.\n\n## Verification\n- python3.12 direct repro of the failing MiniMax switch_model path now passes without _fallback_chain present\n- python3.12 direct repro of fallback-pruning compatibility still passes