From ba71a6844155f1408d6c290855a73bf0b1e787bd Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza Date: Mon, 6 Jul 2026 02:24:52 -0300 Subject: [PATCH] chore(quality): shave the #5976 fix comment back under the auth.ts file-size freeze (2447) --- src/sse/services/auth.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/sse/services/auth.ts b/src/sse/services/auth.ts index e11ee9ba79..a80cade8e7 100644 --- a/src/sse/services/auth.ts +++ b/src/sse/services/auth.ts @@ -1991,16 +1991,11 @@ export async function markAccountUnavailable( ? "rate_limited" : "server_error"; - // #5976: Gemini (and other per-model-quota providers) have model-level rate - // limits, not global. A bare 500 server error is intermittent and NOT - // model-specific — recording a model lockout here blocks the sibling model - // from being tried by both the combo retry loop (isModelLocked check) and - // the credential resolver. Skip lockout/cooldown ONLY for the exact 500 - // (the contract its own tests pin: combo-provider-cooldown-sibling.test.ts - // — "Gemini 503 should NOT skip cooldown"). 502/503/504 keep the - // pre-#6216 model-lockout path: they signal upstream unavailability, and - // returning cooldownMs 0 for them hot-loops the failing upstream and broke - // the resilience-http-e2e priority-fallback guard on the release PR. + // #5976: a bare 500 is intermittent and NOT model-specific — skip + // lockout/cooldown ONLY for the exact 500 (the contract its own tests pin: + // combo-provider-cooldown-sibling.test.ts — "Gemini 503 should NOT skip + // cooldown"). 502/503/504 keep the pre-#6216 model-lockout path: cooldownMs + // 0 hot-loops the failing upstream (broke resilience-http-e2e on the PR). if (status === 500) { updateProviderConnection(connectionId, { lastErrorType: reason,