From 775140299983a380e3cf1e7a894b197c67f0dff2 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 8 Apr 2026 13:09:38 +0900 Subject: [PATCH] fix(runtime-fallback): classify quota exhaustion as STOP not retryable Remove quota exhaustion patterns from RETRYABLE_ERROR_PATTERNS: - 'usage limit reached' patterns (lines 30, 32) - 'insufficient credits' pattern (line 37) - 'credit balance too low' pattern (line 38) These errors indicate permanent quota exhaustion, not temporary rate limits. They are already handled by classifyErrorType() which returns 'quota_exceeded', and isRetryableError() properly stops on these unless there's an explicit auto-retry signal. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/hooks/runtime-fallback/constants.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/hooks/runtime-fallback/constants.ts b/src/hooks/runtime-fallback/constants.ts index a42b10923..19a7cad56 100644 --- a/src/hooks/runtime-fallback/constants.ts +++ b/src/hooks/runtime-fallback/constants.ts @@ -27,15 +27,11 @@ export const RETRYABLE_ERROR_PATTERNS = [ /too.?many.?requests/i, /quota\s+will\s+reset\s+after/i, /quota.?exceeded/i, - /(?:you(?:'ve|\s+have)\s+)?reached\s+your\s+usage\s+limit/i, /exhausted\s+your\s+capacity/i, - /usage\s+limit\s+has\s+been\s+reached/i, /all\s+credentials\s+for\s+model/i, /cool(?:ing)?\s+down/i, /model.{0,20}?not.{0,10}?supported/i, /model_not_supported/i, - /insufficient.?(?:credits?|funds?|balance)/i, - /credit.*balance.*too.*low/i, /service.?unavailable/i, /overloaded/i, /temporarily.?unavailable/i,