chore(resilience): keep lockout files under size ratchet

This commit is contained in:
KooshaPari
2026-06-26 05:02:40 -07:00
parent 0bc232693f
commit 0d80f05e9e
2 changed files with 0 additions and 12 deletions

View File

@@ -325,8 +325,6 @@ function buildProviderProfile(
return {
baseCooldownMs: connectionCooldown.baseCooldownMs,
useUpstreamRetryHints: connectionCooldown.useUpstreamRetryHints,
// Issue #2100 follow-up: propagate stored override (boolean | undefined)
// so the runtime resolver picks user setting first, then per-provider default.
useUpstream429BreakerHints: connectionCooldown.useUpstream429BreakerHints,
maxCooldownMs: resolveModelLockoutSettings(settings).maxCooldownMs,
maxBackoffSteps: connectionCooldown.maxBackoffSteps,

View File

@@ -1999,16 +1999,6 @@ export async function markAccountUnavailable(
const cooldownMs = terminalStatus ? 0 : rawCooldownMs;
// ── #3027: per-model subscription/permission 403 → model-only lockout ──
// Passthrough / per-model-quota providers (e.g. ollama-cloud with
// passthroughModels:true) multiplex many upstream models behind one key.
// A scoped 403 like "this model requires a subscription, upgrade for access"
// is about the paid model, not the key — cooling the whole connection would
// knock out the free models on the same key too and escalate backoff
// (#3001/#3027). This generalizes the grok-web 403 precedent above to every
// hasPerModelQuota provider. Terminal/credential 403s (banned/deactivated
// key, credits exhausted) are excluded here because
// resolveTerminalConnectionStatus() returns a non-null status for them, so
// they keep their existing connection-level cooldown/deactivation path.
if (isPerModelQuotaProvider && status === 403 && provider && model && !terminalStatus) {
const lockout = recordModelLockoutFailure(
provider,