hermes-agent/agent
teknium1 3e2ed18ad0 fix: fallback to main model endpoint when auxiliary summary client fails
When the auxiliary client (used for context compression summaries) fails
— e.g. due to a stale OpenRouter API key after switching to a local LLM
— fall back to the user's active endpoint (OPENAI_BASE_URL) instead of
returning a useless static summary string.

This handles the common scenario where a user switches providers via
'hermes model' but the old provider's API key remains in .env. The
auxiliary client picks up the stale key, fails (402/auth error), and
previously compression would produce garbage. Now it gracefully retries
with the working endpoint.

On successful fallback, the working client is cached for future
compressions in the same session so the fallback cost is paid only once.

Ref: #348
2026-03-04 17:58:09 -08:00
..
__init__.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
auxiliary_client.py fix: handle None message content across codebase (fixes #276) 2026-03-02 02:23:53 -08:00
context_compressor.py fix: fallback to main model endpoint when auxiliary summary client fails 2026-03-04 17:58:09 -08:00
display.py feat: show detailed tool call args in gateway based on config 2026-03-02 05:23:15 -08:00
model_metadata.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
prompt_builder.py Harden agent attack surface: scan writes to memory, skills, cron, and context files 2026-02-25 23:43:15 -05:00
prompt_caching.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
redact.py refactor(cli, auth): Add Codex/OpenAI OAuth Support - finalized 2026-02-28 21:56:27 -08:00
skill_commands.py feat(skills): implement dynamic skill slash commands for CLI and gateway 2026-02-28 11:18:50 -08:00
trajectory.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00