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:
YeonGyu-Kim
2026-03-12 11:05:26 +09:00
parent 99730088ef
commit 755efe226e
2 changed files with 15 additions and 15 deletions

View File

@@ -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" }

View File

@@ -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",
])
/**