mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-05 06:42:12 +03:00
chore(resilience): keep lockout files under size ratchet
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user