mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-21 03:39:54 +00:00
96514de472
When auxiliary.<task> config has base_url set but api_key is empty (common when user expects env var fallback), _resolve_task_provider_model() returned provider="custom" with api_key=None. This caused downstream client construction to make API calls without an Authorization header, resulting in HTTP 401 errors. Fix: only return "custom" when BOTH cfg_base_url AND cfg_api_key are non-empty. When base_url is set without api_key but with a known provider (e.g. "openrouter"), pass through to that provider so it can resolve credentials from environment variables. Fixes #16829