mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-09 13:21:42 +00:00
fix(classifier): treat Anthropic "out of extra usage" 400 as billing
Anthropic returns HTTP 400 with "You're out of extra usage. Add more at claude.ai/settings/usage and keep going." when the account's extra-usage allowance is depleted. The existing _BILLING_PATTERNS list did not include this wording, so classify_api_error fell through to generic format_error — non-retryable and should_fallback=False — causing the agent to abort instead of engaging the configured fallback chain. Add the pattern and a regression test covering the exact Anthropic body.
This commit is contained in:
parent
12556a9a77
commit
ea9e8d6e8c
2 changed files with 20 additions and 0 deletions
|
|
@ -110,6 +110,7 @@ _BILLING_PATTERNS = [
|
|||
"exceeded your current quota",
|
||||
"account is deactivated",
|
||||
"plan does not include",
|
||||
"out of extra usage", # Anthropic OAuth Pro/Max overage bucket depleted (HTTP 400)
|
||||
"out of funds",
|
||||
"run out of funds",
|
||||
"balance_depleted",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue