Merge pull request #1367 from NousResearch/hermes/hermes-aa701810

refactor: unify vision backend gating
This commit is contained in:
Teknium 2026-03-14 20:31:58 -07:00 committed by GitHub
commit 88a48037d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 292 additions and 171 deletions

View file

@ -377,16 +377,11 @@ async def vision_analyze_tool(
def check_vision_requirements() -> bool:
"""Check if an auxiliary vision model is available."""
"""Check if the configured runtime vision path can resolve a client."""
try:
from agent.auxiliary_client import resolve_provider_client
client, _ = resolve_provider_client("openrouter")
if client is not None:
return True
client, _ = resolve_provider_client("nous")
if client is not None:
return True
client, _ = resolve_provider_client("custom")
from agent.auxiliary_client import resolve_vision_provider_client
_provider, client, _model = resolve_vision_provider_client()
return client is not None
except Exception:
return False