mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-03 02:11:48 +00:00
fix: prioritize OPENROUTER_API_KEY over OPENAI_API_KEY
When both OPENROUTER_API_KEY and OPENAI_API_KEY are set (e.g. OPENAI_API_KEY in .bashrc), the wrong key was sent to OpenRouter causing auth failures. Fixed key resolution order in cli.py and runtime_provider.py. Fixes #289
This commit is contained in:
parent
3c13feed4c
commit
6053236158
3 changed files with 34 additions and 2 deletions
|
|
@ -74,8 +74,8 @@ def _resolve_openrouter_runtime(
|
|||
|
||||
api_key = (
|
||||
explicit_api_key
|
||||
or os.getenv("OPENAI_API_KEY")
|
||||
or os.getenv("OPENROUTER_API_KEY")
|
||||
or os.getenv("OPENAI_API_KEY")
|
||||
or ""
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue