From 9357db2844d2b70262d1ad8bae985cb2d210035c Mon Sep 17 00:00:00 2001 From: saitsuki Date: Mon, 20 Apr 2026 17:18:53 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20fix=20fallback=20behavior=20description?= =?UTF-8?q?=20=E2=80=94=20it=20is=20per-turn,=20not=20per-session?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The documentation claimed fallback activates 'at most once per session', but the actual implementation restores the primary model at the start of every run_conversation() call via _restore_primary_runtime(). Relevant source: run_agent.py lines 1666-1694 (snapshot), 6454-6517 (restore), 8681-8684 (called each turn). Updated the One-Shot info box and the summary table to accurately describe the per-turn restoration behavior. --- website/docs/user-guide/features/fallback-providers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/user-guide/features/fallback-providers.md b/website/docs/user-guide/features/fallback-providers.md index de89acc71..859be00c9 100644 --- a/website/docs/user-guide/features/fallback-providers.md +++ b/website/docs/user-guide/features/fallback-providers.md @@ -94,8 +94,8 @@ When triggered, Hermes: The switch is seamless — your conversation history, tool calls, and context are preserved. The agent continues from exactly where it left off, just using a different model. -:::info One-Shot -Fallback activates **at most once** per session. If the fallback provider also fails, normal error handling takes over (retries, then error message). This prevents cascading failover loops. +:::info Per-Turn, Not Per-Session +Fallback is **turn-scoped**: each new user message starts with the primary model restored. If the primary fails mid-turn, fallback activates for that turn only. On the next message, Hermes tries the primary again. Within a single turn, fallback activates at most once — if the fallback also fails, normal error handling takes over (retries, then error message). This prevents cascading failover loops within a turn while giving the primary model a fresh chance every turn. ::: ### Examples @@ -358,7 +358,7 @@ See [Scheduled Tasks (Cron)](/docs/user-guide/features/cron) for full configurat | Feature | Fallback Mechanism | Config Location | |---------|-------------------|----------------| -| Main agent model | `fallback_model` in config.yaml — one-shot failover on errors | `fallback_model:` (top-level) | +| Main agent model | `fallback_model` in config.yaml — per-turn failover on errors (primary restored each turn) | `fallback_model:` (top-level) | | Vision | Auto-detection chain + internal OpenRouter retry | `auxiliary.vision` | | Web extraction | Auto-detection chain + internal OpenRouter retry | `auxiliary.web_extract` | | Context compression | Auto-detection chain, degrades to no-summary if unavailable | `auxiliary.compression` |