NousResearch/hermes-agent

Hermes doctor handling of OPENAI_BASE_URL custom endpoints

Cluster 572 · hermes cli. Data as of

Nothing open on GitHub. Fix merged in #573 on 8 Mar 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 #573. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #573. That is separate from the fix event.
Still open
Nothing open on GitHub.

One issue reports OPENAI_API_KEY not being recognized with a localhost OPENAI_BASE_URL, and two pull requests propose changes to the doctor command to detect custom OpenAI endpoint environment settings and check connectivity. The titles suggest a shared theme, but the cluster does not show whether the changes address the reported problem.

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.

  • #573 fix(doctor): detect OpenAI custom endpoint env settings

    merged to main

    files: hermes_cli/doctor.py, tests/hermes_cli/test_doctor.py

    Show the diff
    • hermes_cli/doctor.py
      @@ -33,6 +33,26 @@
       from hermes_cli.colors import Colors, color
       from hermes_constants import OPENROUTER_MODELS_URL
       
      +
      +_PROVIDER_ENV_HINTS = (
      +    "OPENROUTER_API_KEY",
      +    "OPENAI_API_KEY",
      +    "ANTHROPIC_API_KEY",
      +    "OPENAI_BASE_URL",
      +    "GLM_API_KEY",
      +    "ZAI_API_KEY",
      +    "Z_AI_API_KEY",
      +    "KIMI_API_KEY",
      +    "MINIMAX_API_KEY",
      +    "MINIMAX_CN_API_KEY",
      +)
      +
      +
      +def _has_provider_env_config(content: str) -> bool:
      +    """Return True when ~/.hermes/.env contains provider auth/base URL settings."""
      +    return any(key in content for key in _PROVIDER_ENV_HINTS)
      +
      +
       def check_ok(text: str, detail: str = ""):
           print(f"  {color('✓', Colors.GREEN)} {text}" + (f" {color(detail, Colors.DIM)}" if detail else ""))
       
      @@ -132,12 +152,8 @@ def run_doctor(args):
               
               # Check for common issues
               content = env_path.read_text()
      -        if any(k in content for k in (
      -            "OPENROUTER_API_KEY", "ANTHROPIC_API_KEY",
      -            "GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY",
      -            "KIMI_API_KEY", "MINIMAX_API_KEY", "MINIMAX_CN_API_KEY",
      -        )):
      -            check_ok("API key configured")
      +        if _has_provider_env_config(content):
      +            check_ok("API key or custom endpoint configured")
               else:
                   check_warn("No API key found in ~/.hermes/.env")
                   issues.append("Run 'hermes setup' to configure API keys")
    • tests/hermes_cli/test_doctor.py
      @@ -0,0 +1,17 @@
      +"""Tests for hermes doctor helpers."""
      +
      +from hermes_cli.doctor import _has_provider_env_config
      +
      +
      +class TestProviderEnvDetection:
      +    def test_detects_openai_api_key(self):
      +        content = "OPENAI_BASE_URL=http://localhost:1234/v1\nOPENAI_API_KEY=[redacted:secret-assignment]"
      +        assert _has_provider_env_config(content)
      +
      +    def test_detects_custom_endpoint_without_openrouter_key(self):
      +        content = "OPENAI_BASE_URL=http://localhost:8080/v1\n"
      +        assert _has_provider_env_config(content)
      +
      +    def test_returns_false_when_no_provider_settings(self):
      +        content = "TERMINAL_ENV=local\n"
      +        assert not _has_provider_env_config(content)

1 PR closed without merging

From the close comments: merged via another change 1

  • #623 fix(doctor): add custom endpoint connectivity check for OPENAI_BASE_URL · merged via another change → #573
Closed issues · 1
  • Closed#572[Bug]: OPENAI_API_KEY set but not being recognized by hermes(not connecting at all) or hermes doctor with OPENAI_BASE_URL localhost
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

Subsystem
hermes cli
Merged PRs
#573
Closed issues
1
Attempts
1 PR closed without merging
Fix link checked
8 Mar 2026. This confirmation is old and may be out of date (a revert or reopen would not have invalidated it here); re-verify.

For your agent

The same facts, typed.