fix(quota): keep Antigravity Gemini usable when Claude weekly is empty - #12566
Open
HouMinXi wants to merge 4 commits into
Open
fix(quota): keep Antigravity Gemini usable when Claude weekly is empty#12566HouMinXi wants to merge 4 commits into
HouMinXi wants to merge 4 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(quota): keep Antigravity Gemini usable when Claude weekly is empty
Summary
When Claude weekly hit 0, we wrote
rate_limited_untilfromclaude_gpt_weekly.resetAt(28h-150h) onto the whole connection. Auth then dropped the account beforefamily:claudelocks 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
providerSpecificDataand rehydrate on load. agy / antigravity quota exhaustion no longer writes connection-levelrate_limited_until.Tests
rateLimitedUntilwrite and the picker test failsNot in this PR