From 478e9e8f7342300ec5368c606bc7619ed497c481 Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Thu, 12 Feb 2026 04:24:29 +0700 Subject: [PATCH] feat(cliproxy): add provider error detection for composite fallback - Add PROVIDER_ERROR_PATTERNS for HTTP 4xx/5xx, overloaded, quota, rate limit - Add detectFailedTier() to identify which composite tier failed from stderr - Add isProviderError() to distinguish provider failures from normal exits --- src/cliproxy/executor/retry-handler.ts | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/cliproxy/executor/retry-handler.ts b/src/cliproxy/executor/retry-handler.ts index d3bb5996..724e98b0 100644 --- a/src/cliproxy/executor/retry-handler.ts +++ b/src/cliproxy/executor/retry-handler.ts @@ -11,6 +11,7 @@ import { fail, warn, info } from '../../utils/ui'; import { CLIProxyProvider } from '../types'; import { handleBanDetection } from '../account-safety'; +import { CompositeTierConfig } from '../../config/unified-config-types'; /** * Check if error is network-related @@ -98,3 +99,30 @@ export async function handleQuotaCheck(provider: CLIProxyProvider): Promise p.test(stderr)); +}