Skip to content

fix(vision): try main provider first in vision auto-detection#6041

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-c7eda492
Apr 8, 2026
Merged

fix(vision): try main provider first in vision auto-detection#6041
teknium1 merged 1 commit into
mainfrom
hermes/hermes-c7eda492

Conversation

@teknium1

@teknium1 teknium1 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

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_ORDER loop, try the user's main provider via resolve_provider_client(). Combined with #5978 (named custom provider resolution), this covers all provider types.

E2E verified

Scenario Result
DeepSeek user, no OpenRouter key → vision auto ✓ DeepSeek tried first
Named custom provider beans, no other keys → vision auto ✓ beans tried first
OpenRouter user → vision auto ✓ No regression, OpenRouter still preferred

Test results

Cherry-picked from PR #5376 by @Mibayy. Closes #5366.

@teknium1 teknium1 force-pushed the hermes/hermes-c7eda492 branch from be7973a to c43c155 Compare April 8, 2026 05:49
…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.
@teknium1 teknium1 force-pushed the hermes/hermes-c7eda492 branch from c43c155 to e1a9d12 Compare April 8, 2026 07:46
@teknium1 teknium1 merged commit ab271eb into main Apr 8, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Vision tool failed

2 participants