fix(vision): try main provider first in vision auto-detection#6041
Merged
Conversation
be7973a to
c43c155
Compare
…tive provider Simplify the vision auto-detection chain from 5 backends (openrouter, nous, codex, anthropic, custom) down to 3: 1. OpenRouter (known vision-capable default model) 2. Nous Portal (known vision-capable default model) 3. Active provider + model (whatever the user is running) 4. Stop This is simpler and more predictable. The active provider step uses resolve_provider_client() which handles all provider types including named custom providers (from #5978). Removed the complex preferred-provider promotion logic and API-level fallback — the chain is short enough that it doesn't need them. Based on PR #5376 by Mibay. Closes #5366.
c43c155 to
e1a9d12
Compare
3 tasks
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
Salvages PR #5376 by Mibay.
Bug: Vision auto-detection only iterates
_VISION_AUTO_PROVIDER_ORDER(openrouter, nous, codex, anthropic, custom). Users on DeepSeek, Alibaba, ZAI, Gemini, or named custom providers had vision silently fail — their main provider was never tried.Fix: Mirror the same non-aggregator main-provider-first check that
_resolve_auto()already has for non-vision auxiliary tasks. Before the_VISION_AUTO_PROVIDER_ORDERloop, try the user's main provider viaresolve_provider_client(). Combined with #5978 (named custom provider resolution), this covers all provider types.E2E verified
beans, no other keys → vision autoTest results
Cherry-picked from PR #5376 by @Mibayy. Closes #5366.