From 755efe226eeb28da44952b414621d895efc5e30e Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 12 Mar 2026 11:05:26 +0900 Subject: [PATCH] fix: address Cubic findings for FreeUsageLimitError classification Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/shared/model-error-classifier.test.ts | 2 +- src/shared/model-error-classifier.ts | 28 +++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/shared/model-error-classifier.test.ts b/src/shared/model-error-classifier.test.ts index 21e0b0f56..88ba63dd5 100644 --- a/src/shared/model-error-classifier.test.ts +++ b/src/shared/model-error-classifier.test.ts @@ -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" } diff --git a/src/shared/model-error-classifier.ts b/src/shared/model-error-classifier.ts index eb8236f78..3c3af4982 100644 --- a/src/shared/model-error-classifier.ts +++ b/src/shared/model-error-classifier.ts @@ -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", ]) /**