The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
chore(aux): carry local layer evolution onto current main
Xipong190c73328c53
diff --git a/agent/error_classifier.py b/agent/error_classifier.pyindex 177c5bbd847..ad4e9ae5464 100644--- a/agent/error_classifier.py+++ b/agent/error_classifier.py@@ -113,7 +113,8 @@ _BILLING_ERROR_CODES = frozenset({# contains an overflow phrase; rate limit is matched first so throttle wins._RATE_LIMIT_PATTERNS = ("rate limit", "rate_limit", "too many requests", "throttled", "requests per minute",- "tokens per minute", "requests per day", "try again in", "please retry after", "resource_exhausted",+ "tokens per minute", "requests per day", "try again in", "please retry after",+ "resource exhausted", "resource_exhausted", "resource-exhausted", "resourceexhausted","rate increased too quickly", "throttlingexception", "too many concurrent requests","servicequotaexceededexception", "throttling",)diff --git a/tests/agent/test_error_classifier.py b/tests/agent/test_error_classifier.pyindex b6156a9dc8e..984607abd5e 100644--- a/tests/agent/test_error_classifier.py+++ b/tests/agent/test_error_classifier.py@@ -278,6 +278,23 @@ class TestClassifyApiError:assert result.reason == FailoverReason.rate_limitassert result.should_fallback is True+ @pytest.mark.parametrize("spelling", [+ "resource exhausted",+ "RESOURCE_EXHAUSTED",+ "ResourceExhausted",+ "resource-exhausted",+ ])+ def test_resource_exhausted_separator_variants_without_status(self, spelling):+ result = classify_api_error(+ Exception(f"{spelling}: Worker local total request limit reached (32/32)"),+ provider="nvidia",+ model="nvidia/nemotron-3-ultra-550b-a55b",+ )+ assert result.reason == FailoverReason.rate_limit+ assert result.retryable is True+ assert result.should_rotate_credential is True+ assert result.should_fallback is True+def test_anthropic_429_usage_limit_without_reset_is_billing(self):e = MockAPIError("usage limit reached",