Skip to content

fix(auxiliary): fall back to OPENROUTER_API_KEY when pool entry is missing#10655

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/openrouter-env-fallback
Open

fix(auxiliary): fall back to OPENROUTER_API_KEY when pool entry is missing#10655
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/openrouter-env-fallback

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • fall back to OPENROUTER_API_KEY when an OpenRouter credential pool exists but cannot currently select a usable entry
  • keep pool credentials as the first choice when they are valid
  • add a regression test for the pool-present-but-empty path

Why

Issue #10149 reports No auxiliary LLM provider configured even after setting OPENROUTER_API_KEY in ~/.hermes/.env.

That can happen when Hermes detects an OpenRouter credential pool, but the selected pool entry is unavailable or missing. _try_openrouter() returned (None, None) immediately in that case, so the auto auxiliary path never reached the env-backed key.

Verification

  • python3 -m pytest -o addopts= tests/agent/test_auxiliary_client.py -k "openrouter or compression"
  • python3 -m pytest -o addopts= tests/run_agent/test_compression_feasibility.py

Fixes #10149

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder provider/openrouter OpenRouter aggregator labels Apr 25, 2026
@bobdvb

bobdvb commented May 5, 2026

Copy link
Copy Markdown

Verified this as working on my installation.

@fiscove11

Copy link
Copy Markdown

Thank you

@nashswan0

Copy link
Copy Markdown

where should i run the verification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists provider/openrouter OpenRouter aggregator type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: No auxiliary LLM provider configured

5 participants