mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(agent): classify 'overloaded' messages as server overload, not rate_limit
Closes #14038
This commit is contained in:
parent
620e29fd93
commit
a814b20178
1 changed files with 8 additions and 0 deletions
|
|
@ -773,6 +773,14 @@ def _classify_by_message(
|
|||
should_fallback=True,
|
||||
)
|
||||
|
||||
# Overloaded / server-busy patterns — must come BEFORE rate_limit check
|
||||
# so that "overloaded" messages don't incorrectly trigger credential rotation.
|
||||
if any(p in error_msg for p in ("overloaded", "temporarily overloaded", "service is temporarily overloaded")):
|
||||
return result_fn(
|
||||
FailoverReason.overloaded,
|
||||
retryable=True,
|
||||
)
|
||||
|
||||
# Billing patterns
|
||||
if any(p in error_msg for p in _BILLING_PATTERNS):
|
||||
return result_fn(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue