fix: address Cubic findings for FreeUsageLimitError classification
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -83,7 +83,7 @@ describe("model-error-classifier", () => {
|
||||
expect(provider).toBe("provider-x")
|
||||
})
|
||||
|
||||
test("treats FreeUsageLimitError (lowercase) as retryable by name", () => {
|
||||
test("treats FreeUsageLimitError (PascalCase name) as retryable by name", () => {
|
||||
//#given
|
||||
const error = { name: "FreeUsageLimitError" }
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ import { readConnectedProvidersCache } from "./connected-providers-cache"
|
||||
* These errors completely halt the action loop and should trigger fallback retry.
|
||||
*/
|
||||
const RETRYABLE_ERROR_NAMES = new Set([
|
||||
"ProviderModelNotFoundError",
|
||||
"RateLimitError",
|
||||
"QuotaExceededError",
|
||||
"InsufficientCreditsError",
|
||||
"ModelUnavailableError",
|
||||
"ProviderConnectionError",
|
||||
"AuthenticationError",
|
||||
"providermodelnotfounderror",
|
||||
"ratelimiterror",
|
||||
"quotaexceedederror",
|
||||
"insufficientcreditserror",
|
||||
"modelunavailableerror",
|
||||
"providerconnectionerror",
|
||||
"authenticationerror",
|
||||
"freeusagelimiterror",
|
||||
])
|
||||
|
||||
@@ -21,13 +21,13 @@ const RETRYABLE_ERROR_NAMES = new Set([
|
||||
* These errors are typically user-induced or fixable without switching models.
|
||||
*/
|
||||
const NON_RETRYABLE_ERROR_NAMES = new Set([
|
||||
"MessageAbortedError",
|
||||
"PermissionDeniedError",
|
||||
"ContextLengthError",
|
||||
"TimeoutError",
|
||||
"ValidationError",
|
||||
"SyntaxError",
|
||||
"UserError",
|
||||
"messageabortederror",
|
||||
"permissiondeniederror",
|
||||
"contextlengtherror",
|
||||
"timeouterror",
|
||||
"validationerror",
|
||||
"syntaxerror",
|
||||
"usererror",
|
||||
])
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user