hermes-agent/agent
Teknium 306e67f32d
fix: fail fast when explicit provider has no API key instead of silent OpenRouter fallback (#2445)
When a non-OpenRouter provider (e.g. minimax, anthropic) is set in
config.yaml but its API key is missing, Hermes silently fell back to
OpenRouter, causing confusing 404 errors.

Now checks if the user explicitly configured a provider before falling
back. Explicit providers raise RuntimeError with a clear message naming
the missing env var. Auto/openrouter/custom providers still fall through
to OpenRouter as before.

Three code paths fixed:
- run_agent.py AIAgent.__init__ — main client initialization
- auxiliary_client.py call_llm — sync auxiliary calls
- auxiliary_client.py call_llm_streaming — async auxiliary calls

Based on PR #2272 by @StefanIsMe. Applied manually to fix a
pconfig NameError in the original and extend to call_llm_streaming.

Co-authored-by: StefanIsMe <StefanIsMe@users.noreply.github.com>
2026-03-22 03:59:29 -07:00
..
__init__.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
anthropic_adapter.py fix: Alibaba/DashScope: preserve model dots (qwen3.5-plus) and fix 401 auth 2026-03-21 09:38:04 -07:00
auxiliary_client.py fix: fail fast when explicit provider has no API key instead of silent OpenRouter fallback (#2445) 2026-03-22 03:59:29 -07:00
context_compressor.py fix: case-insensitive model family matching + compressor init logging 2026-03-21 10:47:44 -07:00
context_references.py feat: @ context references — inline file, folder, diff, git, and URL injection 2026-03-21 15:57:13 -07:00
copilot_acp_client.py fix(acp): preserve leading whitespace in streaming chunks 2026-03-20 09:38:13 -07:00
display.py fix(display): suppress spinner animation in non-TTY environments 2026-03-20 12:52:21 -07:00
insights.py fix(security): eliminate SQL string formatting in execute() calls 2026-03-19 15:16:35 +01:00
model_metadata.py Merge pull request #2403 from NousResearch/hermes/hermes-31d7db3b 2026-03-21 18:07:41 -07:00
models_dev.py fix: 6 bugs in model metadata, reasoning detection, and delegate tool 2026-03-20 08:52:37 -07:00
prompt_builder.py feat: priority-based context file selection + CLAUDE.md support (#2301) 2026-03-21 06:26:20 -07:00
prompt_caching.py fix(prompt-caching): skip top-level cache_control on role:tool for OpenRouter 2026-03-21 16:54:43 -07:00
redact.py fix(redact): safely handle non-string inputs 2026-03-21 16:55:02 -07:00
skill_commands.py fix: disabled skills respected across banner, system prompt, slash commands, and skill_view (#1897) 2026-03-18 03:17:37 -07:00
smart_model_routing.py feat: integrate GitHub Copilot providers across Hermes 2026-03-17 23:40:22 -07:00
title_generator.py feat: auto-generate session titles after first exchange 2026-03-17 04:14:40 -07:00
trajectory.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
usage_pricing.py feat: use endpoint metadata for custom model context and pricing (#1906) 2026-03-18 03:04:07 -07:00