diff --git a/sdk/cliproxy/auth/conductor.go b/sdk/cliproxy/auth/conductor.go index 196a3053..a24d111d 100644 --- a/sdk/cliproxy/auth/conductor.go +++ b/sdk/cliproxy/auth/conductor.go @@ -1416,8 +1416,12 @@ func (m *Manager) MarkResult(ctx context.Context, result Result) { shouldSuspendModel = true setModelQuota = true case 408, 500, 502, 503, 504: - next := now.Add(1 * time.Minute) - state.NextRetryAfter = next + if quotaCooldownDisabled.Load() { + state.NextRetryAfter = time.Time{} + } else { + next := now.Add(1 * time.Minute) + state.NextRetryAfter = next + } default: state.NextRetryAfter = time.Time{} } @@ -1668,7 +1672,11 @@ func applyAuthFailureState(auth *Auth, resultErr *Error, retryAfter *time.Durati auth.NextRetryAfter = next case 408, 500, 502, 503, 504: auth.StatusMessage = "transient upstream error" - auth.NextRetryAfter = now.Add(1 * time.Minute) + if quotaCooldownDisabled.Load() { + auth.NextRetryAfter = time.Time{} + } else { + auth.NextRetryAfter = now.Add(1 * time.Minute) + } default: if auth.StatusMessage == "" { auth.StatusMessage = "request failed"