NousResearch/hermes-agent · error · RuntimeError

No LLM provider configured for task={task} provider={resolve

Error message

No LLM provider configured for task={task} provider={resolved_provider}. Run: hermes setup

What it means

Synchronous auxiliary resolution for a vision task: the explicitly configured vision provider produced no client, Hermes already fell back to resolve_vision_provider_client(provider="auto"), and even the auto vision chain found zero usable credentials. The raise means no LLM provider of any kind is available for vision work.

Source

Thrown at agent/auxiliary_client.py:9127

            model=resolved_model or model,
            base_url=resolved_base_url or base_url,
            api_key=resolved_api_key or api_key,
            async_mode=False,
            main_runtime=main_runtime,
        )
        if client is None and resolved_provider != "auto" and not resolved_base_url:
            logger.warning(
                "Vision provider %s unavailable, falling back to auto vision backends",
                resolved_provider,
            )
            effective_provider, client, final_model = resolve_vision_provider_client(
                provider="auto",
                model=resolved_model,
                async_mode=False,
                main_runtime=main_runtime,
            )
        if client is None:
            raise RuntimeError(
                f"No LLM provider configured for task={task} provider={resolved_provider}. "
                f"Run: hermes setup"
            )
        resolved_provider = effective_provider or resolved_provider
    else:
        client, final_model = _get_cached_client(
            resolved_provider,
            resolved_model,
            base_url=resolved_base_url,
            api_key=resolved_api_key,
            api_mode=resolved_api_mode,
            main_runtime=main_runtime,
            task=task,
        )
        effective_provider = _effective_provider_for_client(
            client, resolved_provider,
        )
        if client is None:

View on GitHub (pinned to c896c09c42)

Solutions

  1. Run `hermes setup` and configure at least one provider API key.
  2. Verify ~/.hermes/.env (or the profile's .env) contains a valid key such as OPENAI_API_KEY or OPENROUTER_API_KEY.
  3. Check the right profile is active (`hermes -p <name>`) — profiles have isolated .env files.
  4. Confirm the vision-specific override `auxiliary.vision.provider` is not set to a provider you have no key for.
Defensive patterns

Strategy: validation

Validate before calling

from hermes_cli.config import load_config
from pathlib import Path
cfg = load_config()
env = (Path.home() / ".hermes" / ".env").read_text() if (Path.home() / ".hermes" / ".env").exists() else ""
assert any(k in env for k in ("OPENAI_API_KEY", "OPENROUTER_API_KEY", "ANTHROPIC_API_KEY")), "no vision-capable key"

Try / catch

try:
    result = aux_vision_call(...)
except RuntimeError as e:
    if "Run: hermes setup" in str(e):
        show_setup_guidance(); return None  # graceful degradation without vision

Prevention

When it happens

Trigger: task == 'vision' with provider X configured but X's API key absent, and no other provider key (OpenRouter/OpenAI/Anthropic/...) present either; async_mode=False path at line 9127.

Common situations: Fresh install with no keys configured; all keys removed or expired; .env file unreadable due to permissions; running under a profile whose HERMES_HOME has no .env.

Related errors


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/2694740d10f42dea. Report an issue: GitHub.