mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
Merge b538cc195d into 05d8f11085
This commit is contained in:
commit
2ceaae7658
1 changed files with 6 additions and 1 deletions
|
|
@ -11477,7 +11477,12 @@ class AIAgent:
|
|||
api_error, retry_count=retry_count, max_retries=max_retries,
|
||||
):
|
||||
primary_recovery_attempted = True
|
||||
retry_count = 0
|
||||
# Do NOT reset retry_count to 0 — that causes the
|
||||
# attempt counter to show (1/3), (2/3), (1/3), (2/3)
|
||||
# instead of a monotonically increasing sequence.
|
||||
# Grant one extra attempt beyond max_retries so the
|
||||
# rebuilt client gets exactly one shot (issue #12956).
|
||||
max_retries += 1
|
||||
continue
|
||||
# Try fallback before giving up entirely
|
||||
self._emit_status(f"⚠️ Max retries ({max_retries}) exhausted — trying fallback...")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue