Commit graph

2 commits

Author SHA1 Message Date
Tranquil-Flow
887b3d4e38 fix(agent): preserve auto vision fallback for custom backends 2026-04-25 10:09:09 +10:00
Tranquil-Flow
1b4be27642 fix(agent): skip non-vision models in vision auto-detection fallback (#14744)
When the user's provider (e.g. ollama-cloud) is not in _PROVIDER_VISION_MODELS,
the auto-detection falls through to the main model which may not be
vision-capable (e.g. llama3).  This sends an image payload to a text-only
model that will fail.

Add _is_likely_vision_model() heuristic that checks model names for known
vision/multimodal indicators.  When no explicit vision override exists and
the main model does not appear vision-capable, skip directly to aggregator
fallbacks instead of attempting a doomed request.
2026-04-25 09:19:22 +10:00