fix(model): quota errors should STOP not retry

This commit is contained in:
YeonGyu-Kim
2026-04-05 09:13:14 +09:00
parent d7d3698f70
commit aeb9c97c30
2 changed files with 56 additions and 6 deletions
+8 -2
View File
@@ -8,11 +8,14 @@ import { readConnectedProvidersCache } from "./connected-providers-cache"
const RETRYABLE_ERROR_NAMES = new Set([
"providermodelnotfounderror",
"ratelimiterror",
"quotaexceedederror",
"insufficientcreditserror",
"modelunavailableerror",
"providerconnectionerror",
"authenticationerror",
])
const STOP_ERROR_NAMES = new Set([
"quotaexceedederror",
"insufficientcreditserror",
"freeusagelimiterror",
])
@@ -106,6 +109,9 @@ export function isRetryableModelError(error: ErrorInfo): boolean {
if (NON_RETRYABLE_ERROR_NAMES.has(errorNameLower)) {
return false
}
if (STOP_ERROR_NAMES.has(errorNameLower)) {
return false
}
// Check if it's a known retryable error
if (RETRYABLE_ERROR_NAMES.has(errorNameLower)) {
return true