{"record":{"id":"86f177e37e1be06a","repo":"NousResearch/hermes-agent","slug":"auxiliary-task-or-call-provider-resolved-pro","errorCode":null,"errorMessage":"Auxiliary {task or 'call'}: provider {resolved_provider} could not be rebuilt after recovery","messagePattern":"Auxiliary (.+?): provider (.+?) could not be rebuilt after recovery","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/auxiliary_client.py","lineNumber":4616,"sourceCode":"            model=final_model,\n            base_url=resolved_base_url,\n            api_key=resolved_api_key,\n            async_mode=False,\n        )\n    else:\n        retry_client, retry_model = _get_cached_client(\n            resolved_provider,\n            resolved_model,\n            base_url=resolved_base_url,\n            api_key=resolved_api_key,\n            api_mode=resolved_api_mode,\n            main_runtime=main_runtime,\n        )\n        effective_provider = _effective_provider_for_client(\n            retry_client, resolved_provider,\n        )\n    if retry_client is None:\n        raise RuntimeError(\n            f\"Auxiliary {task or 'call'}: provider {resolved_provider} could not be rebuilt after recovery\"\n        )\n\n    retry_base = str(getattr(retry_client, \"base_url\", \"\") or \"\")\n    retry_kwargs = _build_call_kwargs(\n        effective_provider or resolved_provider,\n        retry_model or final_model,\n        messages,\n        temperature=temperature,\n        max_tokens=max_tokens,\n        tools=tools,\n        timeout=effective_timeout,\n        extra_body=effective_extra_body,\n        reasoning_config=reasoning_config,\n        base_url=retry_base or resolved_base_url,\n        task=task,\n    )\n    # Preserve per-request attribution headers (e.g. Copilot's","sourceCodeStart":4598,"sourceCodeEnd":4634,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/auxiliary_client.py#L4598-L4634","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify credentials for the named provider still resolve (env vars, ~/.hermes/.env, credential pool)","Run `hermes setup` or `hermes model` to reselect the provider and rebuild its runtime","Restart the process to force clean provider resolution from current config","Check logs for provider-plugin load errors if a plugin backs the failing provider"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"def provider_rebuildable(resolved_provider: str) -> bool:\n    from agent.auxiliary_client import _get_cached_client\n    try:\n        client = _get_cached_client(resolved_provider, resolved_model)\n        return client is not None\n    except Exception:\n        return False\n\n# before the recovery retry:\nif not provider_rebuildable(resolved_provider):\n    surface_credential_error(resolved_provider)  # instead of a bare RuntimeError","typeGuard":null,"tryCatchPattern":"try:\n        result = retry_auxiliary_call(...)\nexcept RuntimeError as e:\n    if \"could not be rebuilt after recovery\" in str(e):\n        reload_provider_config()  # re-read credentials / reselect provider\n        result = retry_auxiliary_call(...)\n    else:\n        raise","preventionTips":["Keep provider credentials stable for the lifetime of a running session","After rotating keys or switching profiles, restart long-running processes","Log the resolved provider/model whenever recovery triggers, to identify which credential vanished"],"tags":["auxiliary","provider","recovery","credentials"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}