NousResearch/hermes-agent

Fix auxiliary task base_url/api_key ignored with explicit provider

Cluster 58515. Data as of

Nothing open on GitHub. Fix merged in #59140 on 5 Jul 2026. Check it covers your case.

The short answer

0open issues
0open PRs
3items grouped
Known?
Yes. 3 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #59140. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #59140. That is separate from the fix event.
Still open
Nothing open on GitHub.

These issues and PRs address a bug where auxiliary task configuration (base_url and api_key) is not honored when a provider is passed explicitly. The fix ensures those settings are respected in that code path.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #59140 fix(agent): honor auxiliary.<task>.base_url/api_key when provider is passed explicitly

    merged to main

    files: agent/auxiliary_client.py, tests/agent/test_auxiliary_client.py

    Show the diff
    • agent/auxiliary_client.py
      @@ -5532,6 +5532,18 @@ def _preserve_provider_with_base_url(prov: Optional[str]) -> bool:
           if cfg_provider:
               cfg_provider, cfg_base_url = _expand_direct_api_alias(cfg_provider, cfg_base_url)
       
      +    # An explicit provider arg without an explicit base_url must not bypass
      +    # the task's configured endpoint: adopt auxiliary.<task>.base_url/api_key
      +    # when the config targets the same provider (or names none), so the
      +    # early `if provider:` return below carries the configured endpoint
      +    # instead of falling through to main-runtime resolution (#58515).
      +    # An explicit "auto" is excluded — it means "inherit / auto-detect" and
      +    # must keep flowing through the existing auto-resolution chain.
      +    if provider and provider != "auto" and not base_url and cfg_base_url and cfg_provider in (None, provider):
      +        base_url = cfg_base_url
      +        if not api_key:
      +            api_key = [redacted:secret-assignment]
      +
           if base_url and _preserve_provider_with_base_url(provider):
               return provider, resolved_model, base_url, api_key, resolved_api_mode
           if base_url:
    • tests/agent/test_auxiliary_client.py
      @@ -168,6 +168,112 @@ def test_direct_openai_alias_with_base_url_still_routes_as_custom(self):
               assert api_key == "sk-test"
               assert api_mode is None
       
      +    def test_explicit_provider_adopts_configured_task_endpoint(self):
      +        """Explicit provider matching the configured one must not bypass
      +        auxiliary.<task>.base_url/api_key (#58515)."""
      +        task_config = {
      +            "provider": "custom",
      +            "model": "meta/llama-3.2-11b-vision-instruct",
      +            "base_url": "https://integrate.api.nvidia.com/v1",
      +            "api_key": "[redacted:secret-assignment]",
      +        }
      +        with patch("agent.auxiliary_client._get_auxiliary_task_config", return_value=task_config):
      +            resolved_provider, model, base_url, api_key, api_mode = _resolve_task_provider_model(
      +                task="vision",
      +                provider="custom",
      +                model="meta/llama-3.2-11b-vision-instruct",
      +            )
      +
      +        assert resolved_provider == "custom"
      +        assert base_url == "https://integrate.api.nvidia.com/v1"
      +        assert api_key == "nvapi-secret"
      +        assert model == "meta/llama-3.2-11b-vision-instruct"
      +        assert api_mode is None
      +
      +    def test_explicit_provider_adopts_endpoint_when_config_names_no_provider(self):
      +        task_config = {
      +            "base_url": "https://nim.example/v1",
      +            "api_key": "[redacted:secret-assignment]",
      +        }
      +        with patch("agent.auxiliary_client._get_auxiliary_task_config", return_value=task_config):
      +            resolved_provider, model, base_url, api_key, api_mode = _resolve_task_provider_model(
      +                task="vision",
      +                provider="custom",
      +            )
      +
      +        assert resolved_provider == "custom"
      +        assert base_url == "https://nim.example/v1"
      +        assert api_key == "cfg-key"
      +
      +    def test_explicit_first_class_provider_with_matching_config_keeps_identity(self):
      +        task_config = {
      +            "provider": "anthropic",
      +            "base_url": "https://anthropic-proxy.example/v1",
      +            "api_key": "[redacted:secret-assignment]",
      +        }
      +        with patch("agent.auxiliary_client._get_auxiliary_task_config", return_value=task_config):
      +            resolved_provider, model, base_url, api_key, api_mode = _resolve_task_provider_model(
      +                task="compression",
      +                provider="anthropic",
      +            )
      +
      +        assert resolved_provider == "anthropic"
      +        assert base_url == "https://anthropic-proxy.example/v1"
      +        assert api_key == "cfg-key"
      +
      +    def test_explicit_auto_provider_keeps_auto_resolution(self):
      +        """provider="auto" is a sentinel for "inherit / auto-detect" and must
      +        not adopt the configured endpoint — the auto chain owns resolution."""
      +        task_config = {
      +            "base_url": "https://nim.example/v1",
      +            "api_key": "[redacted:secret-assignment]",
      +        }
      +        with patch("agent.auxiliary_client._get_auxiliary_task_config", return_value=task_config):
      +            resolved_provider, model, base_url, api_key, api_mode = _resolve_task_provider_model(
      +                task="vision",
      +                provider="auto",
      +            )
      +
      +        assert resolved_provider == "auto"
      +        assert base_url is None
      +        assert api_key is None
      +
      +    def test_explicit_provider_differing_from_config_ignores_config_endpoint(self):
      +        """A caller forcing a different provider keeps full explicit-arg
      +        priority — the configured endpoint belongs to cfg_provider only."""
      +        task_config = {
      +            "provider": "custom",
      +            "base_url": "https://nim.example/v1",
      +            "api_key": "[redacted:secret-assignment]",
      +        }
      +        with patch("agent.auxiliary_client._get_auxiliary_task_config", return_value=task_config):
      +            resolved_provider, model, base_url, api_key, api_mode = _resolve_task_provider_model(
      +                task="vision",
      +                provider="nous",
      +            )
      +
      +        assert resolved_provider == "nous"
      +        assert base_url is None
      +        assert api_key is None
      +
      +    def test_explicit_provider_and_base_url_still_win_over_config(self):
      +        task_config = {
      +            "provider": "custom",
      +            "base_url": "https://configured.example/v1",
      +            "api_key": "[redacted:secret-assignment]",
      +        }
      +        with patch("agent.auxiliary_client._get_auxiliary_task_config", return_value=task_config):
      +            resolved_provider, model, base_url, api_key, api_mode = _resolve_task_provider_model(
      +                task="vision",
      +                provider="custom",
      +                base_url="https://explicit.example/v1",
      +                api_key="[redacted:secret-assignment]",
      +            )
      +
      +        assert resolved_provider == "custom"
      +        assert base_url == "https://explicit.example/v1"
      +        assert api_key == "explicit-key"
      +
       
       class TestBuildCallKwargsMaxTokens:
           """_build_call_kwargs should not cap output by default (#34530).

1 PR closed without merging

From the close comments: merged via another change 1

  • #58520 fix(agent): honor auxiliary.<task>.base_url/api_key when provider is passed explicitly · merged via another change → 9ad912a, #59140
Closed issues · 1
  • Closed#58515_resolve_task_provider_model ignores auxiliary.<task>.base_url when provider passed explicitly
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.67: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Merged PRs
#59140
Closed issues
1
Attempts
1 PR closed without merging
Fix link checked
5 Jul 2026

For your agent

The same facts, typed.