Conversation
|
Thanks for fixing the main routing precedence here. I tested the #29135 scenario locally and agree that One extra edge case showed up during local validation that this PR may not cover yet:
Concrete failing shape: model:
provider: openai-codex
default: gpt-5.5
agent:
image_input_mode: auto
auxiliary:
vision:
provider: dashscope # or any stale/unresolvable explicit provider
model: qwen-vl-max-latestWith the routing fix, I tested a supplemental local patch that makes the requirements check treat native main-model vision as a valid runtime vision path before falling back to auxiliary client resolution: def check_vision_requirements() -> bool:
try:
from agent.auxiliary_client import _read_main_provider, _read_main_model
from agent.image_routing import decide_image_input_mode
from hermes_cli.config import load_config
cfg = load_config()
provider = _read_main_provider()
model = _read_main_model()
if (
decide_image_input_mode(provider, model, cfg) == "native"
and _supports_media_in_tool_results(provider, model)
):
return True
except Exception:
pass
# existing auxiliary resolution fallback follows...I also added tests for:
Local targeted test result: Runtime diagnostic after the supplemental patch, with the stale Without this additional readiness change, #32519 fixes the routing decision but a broken auxiliary vision config can still suppress the tool that loads images into the native path. I think this PR should include that small |
|
Thanks for fixing the core routing precedence here. I hit the same issue locally and this PR's One related gap I found while testing with a stale/broken The second layer is
Local diagnostic expected in that case: So I think the complete fix has two parts:
Happy to open a small follow-up PR limited to |
|
Merged via PR #57650. Your commit was cherry-picked onto current main with your authorship preserved in git log (rebase-merge). Auto mode now prefers native vision on vision-capable main models, with an explicit auxiliary.vision block acting as the fallback for text-only models. Thanks! |
Summary
Fixes #29135. In
agent.image_input_mode: auto, the routing decision now checks the active main model's vision capability before theauxiliary.visionexplicit-override check. This lets a single profile work for both text-only and vision-capable main models:supports_vision: true) -> native multimodal input, full pixels.auxiliary.visionbackend for text description.Previously, any explicit
auxiliary.vision.providerforced the text pipeline regardless of main-model capability, making the auxiliary block unusable as a true fallback.Changes
agent/image_routing.py: indecide_image_input_mode, run_lookup_supports_visionfirst; only consult_explicit_aux_vision_overridewhen the main model does not support vision. Updated module docstring and_explicit_aux_vision_overridedocstring to reflect the fallback semantics.tests/agent/test_image_routing.py: updated the two tests that encoded the old "aux override wins" precedence, and added regression coverage for Image auto-routing cannot use native vision when auxiliary.vision is configured as fallback #29135 (native preferred when supports_vision=True, aux fallback used when False).Test plan
pytest tests/agent/test_image_routing.py-> 59 passednativetextagent.image_input_mode: native/textstill override auto