chore(quality): shave the #5976 fix comment back under the auth.ts file-size freeze (2447)

This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-07-06 02:24:52 -03:00
parent 7a14a96b83
commit ba71a68441

View File

@@ -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,