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")
|
expect(provider).toBe("provider-x")
|
||||||
})
|
})
|
||||||
|
|
||||||
test("treats FreeUsageLimitError (lowercase) as retryable by name", () => {
|
test("treats FreeUsageLimitError (PascalCase name) as retryable by name", () => {
|
||||||
//#given
|
//#given
|
||||||
const error = { name: "FreeUsageLimitError" }
|
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.
|
* These errors completely halt the action loop and should trigger fallback retry.
|
||||||
*/
|
*/
|
||||||
const RETRYABLE_ERROR_NAMES = new Set([
|
const RETRYABLE_ERROR_NAMES = new Set([
|
||||||
"ProviderModelNotFoundError",
|
"providermodelnotfounderror",
|
||||||
"RateLimitError",
|
"ratelimiterror",
|
||||||
"QuotaExceededError",
|
"quotaexceedederror",
|
||||||
"InsufficientCreditsError",
|
"insufficientcreditserror",
|
||||||
"ModelUnavailableError",
|
"modelunavailableerror",
|
||||||
"ProviderConnectionError",
|
"providerconnectionerror",
|
||||||
"AuthenticationError",
|
"authenticationerror",
|
||||||
"freeusagelimiterror",
|
"freeusagelimiterror",
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -21,13 +21,13 @@ const RETRYABLE_ERROR_NAMES = new Set([
|
|||||||
* These errors are typically user-induced or fixable without switching models.
|
* These errors are typically user-induced or fixable without switching models.
|
||||||
*/
|
*/
|
||||||
const NON_RETRYABLE_ERROR_NAMES = new Set([
|
const NON_RETRYABLE_ERROR_NAMES = new Set([
|
||||||
"MessageAbortedError",
|
"messageabortederror",
|
||||||
"PermissionDeniedError",
|
"permissiondeniederror",
|
||||||
"ContextLengthError",
|
"contextlengtherror",
|
||||||
"TimeoutError",
|
"timeouterror",
|
||||||
"ValidationError",
|
"validationerror",
|
||||||
"SyntaxError",
|
"syntaxerror",
|
||||||
"UserError",
|
"usererror",
|
||||||
])
|
])
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user