NousResearch/hermes-agent · error · RuntimeError

Auxiliary {task or 'call'}: provider {resolved_provider} cou

Error message

Auxiliary {task or 'call'}: provider {resolved_provider} could not be rebuilt after recovery

What it means

Raised during auxiliary-call recovery: after a failure, the retry path rebuilds the provider client via _get_cached_client(resolved_provider, ...); if that returns None, no retry client exists and the operation raises instead of looping with nothing to call. The message names the auxiliary task (compression, curator, title generation, ...) and the provider that could not be rebuilt.

Source

Thrown at agent/auxiliary_client.py:4616

            model=final_model,
            base_url=resolved_base_url,
            api_key=resolved_api_key,
            async_mode=False,
        )
    else:
        retry_client, retry_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,
        )
        effective_provider = _effective_provider_for_client(
            retry_client, resolved_provider,
        )
    if retry_client is None:
        raise RuntimeError(
            f"Auxiliary {task or 'call'}: provider {resolved_provider} could not be rebuilt after recovery"
        )

    retry_base = str(getattr(retry_client, "base_url", "") or "")
    retry_kwargs = _build_call_kwargs(
        effective_provider or resolved_provider,
        retry_model or final_model,
        messages,
        temperature=temperature,
        max_tokens=max_tokens,
        tools=tools,
        timeout=effective_timeout,
        extra_body=effective_extra_body,
        reasoning_config=reasoning_config,
        base_url=retry_base or resolved_base_url,
        task=task,
    )
    # Preserve per-request attribution headers (e.g. Copilot's

View on GitHub (pinned to c896c09c42)

Solutions

  1. Verify credentials for the named provider still resolve (env vars, ~/.hermes/.env, credential pool)
  2. Run `hermes setup` or `hermes model` to reselect the provider and rebuild its runtime
  3. Restart the process to force clean provider resolution from current config
  4. Check logs for provider-plugin load errors if a plugin backs the failing provider
Defensive patterns

Strategy: retry

Validate before calling

def provider_rebuildable(resolved_provider: str) -> bool:
    from agent.auxiliary_client import _get_cached_client
    try:
        client = _get_cached_client(resolved_provider, resolved_model)
        return client is not None
    except Exception:
        return False

# before the recovery retry:
if not provider_rebuildable(resolved_provider):
    surface_credential_error(resolved_provider)  # instead of a bare RuntimeError

Try / catch

try:
        result = retry_auxiliary_call(...)
except RuntimeError as e:
    if "could not be rebuilt after recovery" in str(e):
        reload_provider_config()  # re-read credentials / reselect provider
        result = retry_auxiliary_call(...)
    else:
        raise

Prevention

When it happens

Trigger: An auxiliary call failed, recovery invoked _get_cached_client with the resolved provider/model/key/mode, and it returned None — credentials for the provider disappeared mid-session, the provider plugin failed to load, or the client builder raised and the failure was normalized to a None return.

Common situations: API key removed or expired while a long session was running; provider plugin broken after an upgrade; profile or credential pool switched underneath a live process; transient builder error during recovery.

Related errors


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