fix(routing): check native vision before aux override in decide_image_input_mode - #48952
fix(routing): check native vision before aux override in decide_image_input_mode#48952moeedahmed wants to merge 0 commit into
Conversation
|
Duplicate of #44305 — both reorder |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
- Well-scoped fix checking native vision support before aux vision override in decide_image_input_mode
- Correct logic: vision-capable primary models (gpt-5.5, claude-sonnet-4, etc.) should use native vision, not be short-circuited by a configured auxiliary vision model
- Minimal 3-line reorder with clear comment explaining the rationale
- No new code paths; just reorders existing checks to the correct precedence
Reviewed by Hermes Agent
|
Note: This is NOT a duplicate of the prior closed PRs (#44305, #44305, #44320, #48029, #44450, #44299). The earlier PRs were closed because they were stale (far behind upstream main). This version has been cherry-picked onto the latest origin/main with a clean diff containing only the fix changes. No conflicts. CI green. Ready for review. |
835f512 to
a05b64d
Compare
When a user configures an explicit auxiliary vision model (e.g. gemma4:e2b via ollama), _explicit_aux_vision_override was checked before _lookup_supports_vision. This meant vision-capable primaries (gpt-5.5, claude-sonnet-4) were incorrectly forced to ''text'' routing anytime an aux vision model was configured.
Fix: check _lookup_supports_vision first. If the primary can handle images natively (supports_vision=True), use native routing. The aux override only applies when the primary lacks vision (e.g. deepseek fallback → local gemma).