Skip to content

fix(quota): keep Antigravity Gemini usable when Claude weekly is empty - #12566

Open
HouMinXi wants to merge 4 commits into
diegosouzapw:release/v3.8.51from
HouMinXi:fix/agy-family-not-connection-cooldown
Open

fix(quota): keep Antigravity Gemini usable when Claude weekly is empty#12566
HouMinXi wants to merge 4 commits into
diegosouzapw:release/v3.8.51from
HouMinXi:fix/agy-family-not-connection-cooldown

Conversation

@HouMinXi

@HouMinXi HouMinXi commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

fix(quota): keep Antigravity Gemini usable when Claude weekly is empty

Summary

When Claude weekly hit 0, we wrote rate_limited_until from claude_gpt_weekly.resetAt (28h-150h) onto the whole connection. Auth then dropped the account before family:claude locks were even considered, so Gemini quota that was still 40-100% sat unused.

Preflight and combo cutoff now look only at the requested model family. Family locks persist in providerSpecificData and rehydrate on load. agy / antigravity quota exhaustion no longer writes connection-level rate_limited_until.

Tests

  • Gemini preflight ignores Claude weekly
  • 429 does not write a connection cooldown
  • combo cutoff is family-scoped
  • PSD persist / rehydrate
  • sibling preflight, quota-skipping, 429 cooldown, and sse-auth credits suites still pass
  • disable family window selection and Gemini inherits Claude weekly (new tests fail); restore the 429 rateLimitedUntil write and the picker test fails

Not in this PR

  • Dashboard UI for family cooldowns
  • A schema change (locks live in existing PSD JSON)

Claude weekly exhaustion wrote connection-level rate_limited_until from
claude_gpt_weekly.resetAt (28h-150h). Auth dropped the whole account
before family:claude locks ran, so leftover Gemini quota (40-100%)
became unreachable.

Scope preflight and combo cutoff to the requested model family. Persist
family locks in providerSpecificData and rehydrate on load. Stop writing
connection-level rate_limited_until for agy/antigravity quota exhaustion.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
A queries-per-minute 429 was exact-model locked, then written into
providerSpecificData.antigravityFamilyRateLimitedUntil. Rehydrate
treated that as family:gemini and blocked sibling Gemini models.

Persist family cooldowns only for quota_exhausted. Register the new
getProviderConnectionById site in the hard-lease inventory.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
Move preflight unavailable handling and family persist wrappers out of
auth.ts / accountFallback.ts / antigravity.ts so frozen files stay under
cap. Combo remaining-% scan lives in antigravityQuotaFamily. Register the
new family tests in stryker tap.testFiles.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
agy and antigravity are distinct lock namespaces. Preflight previously
locked only the caller spelling, so a Gemini request on the other id
could still pick the same connection. Dual-write both ids, matching the
executor path. Cover RPM 429 the same way as QPM: exact-model, no family PSD.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant