mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-11 17:52:31 +03:00
[v3.8.50] fix(antigravity): lock full quota per exact model (#8630)
Validated in local merge-train T6 (ungrouped batch 1)
This commit is contained in:
@@ -1778,7 +1778,10 @@ async function handleSingleModelChat(
|
||||
result.status,
|
||||
0,
|
||||
providerProfile,
|
||||
{ maxCooldownMs: mlSettings.maxCooldownMs }
|
||||
{
|
||||
maxCooldownMs: mlSettings.maxCooldownMs,
|
||||
scope: provider === "antigravity" ? "exact" : undefined,
|
||||
}
|
||||
);
|
||||
|
||||
log.info(
|
||||
|
||||
@@ -2029,9 +2029,12 @@ export async function markAccountUnavailable(
|
||||
return { shouldFallback: true, cooldownMs: 0 };
|
||||
}
|
||||
|
||||
const quotaScope = getQuotaScopeLabelForProvider(provider, model);
|
||||
const usesExactAntigravityLock = provider === "antigravity";
|
||||
const quotaScope = usesExactAntigravityLock
|
||||
? "model"
|
||||
: getQuotaScopeLabelForProvider(provider, model);
|
||||
const antigravityFamilyInferredBaseCooldownMs =
|
||||
provider === "antigravity" && quotaScope === "family" && status === 429
|
||||
!usesExactAntigravityLock && provider === "antigravity" && quotaScope === "family" && status === 429
|
||||
? ANTIGRAVITY_FAMILY_INFERRED_BASE_COOLDOWN_MS
|
||||
: null;
|
||||
const lockout = recordModelLockoutFailure(
|
||||
@@ -2054,6 +2057,7 @@ export async function markAccountUnavailable(
|
||||
? fallbackResult.cooldownMs
|
||||
: (fallbackResult.quotaResetHintMs ?? null),
|
||||
maxCooldownMs: mlSettings.maxCooldownMs,
|
||||
scope: usesExactAntigravityLock ? "exact" : undefined,
|
||||
// #6863 vs #7940: exactCooldownMs above is only ever set from a genuine
|
||||
// upstream signal (Retry-After/reset header or a parsed quotaResetHintMs) —
|
||||
// never a synthetic estimate — so it must bypass maxCooldownMs instead of
|
||||
|
||||
Reference in New Issue
Block a user