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
+1 -1
View File
@@ -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" }
+14 -14
View File
@@ -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",
]) ])
/** /**