fix(image_routing): check main model vision support before aux override - #44305
Closed
blut-agent wants to merge 1 commit into
Closed
fix(image_routing): check main model vision support before aux override#44305blut-agent wants to merge 1 commit into
blut-agent wants to merge 1 commit into
Conversation
When the main model supports vision (supports_vision=True), images now go through the native path even if auxiliary.vision is explicitly configured. The aux override is now a fallback for non-vision models only, not a blanket override that blocks native vision. This fixes the bug where providers like Xiaomi MiMo (which has supports_vision=True) were incorrectly routed to text-only mode when auxiliary.vision was configured. Also updates the module docstring to reflect the new priority order.
Contributor
|
✅ Verified — vision routing priority reorder Reviewed the diff for
No issues found. The reorder is a clean semantic improvement. |
Collaborator
This was referenced Jun 19, 2026
Contributor
Author
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.
Bug
When
auxiliary.visionis explicitly configured, images were forced through the text pipeline even when the main model supports vision (e.g.xiaomi/mimo-v2.5).Root Cause
In
agent/image_routing.py,decide_image_input_mode()checked_explicit_aux_vision_override()before checking main model vision support, unconditionally blocking the native path.Fix
Reorder checks: main model vision support is checked first, aux override becomes a fallback for non-vision models only.
Changes
agent/image_routing.py: reordered checks indecide_image_input_mode(), updated module docstringtests/agent/test_image_routing.py: split test into two — verifies native when main model supports vision (with aux configured), and text when main model is non-vision (with aux configured)Tests
tests/agent/test_image_routing.py: 76 passedtests/agent/test_custom_providers_vision.py: 13 passed