Skip to content

[v3.8.50] fix(antigravity): lock full quota per exact model - #8630

Merged
diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.50from
costaeder:fix/antigravity-exact-model-quota-lock
Aug 6, 2026
Merged

diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.50from
costaeder:fix/antigravity-exact-model-quota-lock

Conversation

@costaeder

Copy link
Copy Markdown
Contributor

A full-quota Antigravity 429 currently persists rate_limited_until for the whole connection. That disables unrelated models on the same account.\n\nThis introduces an exact provider/account/model lock that coexists with existing quota-family locks, routes Antigravity quota paths through it, and keeps the connection eligible for sibling models. A successful request for the same model clears the exact lock through the existing success path.\n\nThe lock is intentionally in-memory; the connection-wide persisted cooldown is not reused because it would reintroduce the cross-model outage.\n\nTests: Antigravity quota-family suite (7 passing).

@costaeder
costaeder requested a review from diegosouzapw as a code owner July 26, 2026 02:42
@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.49 July 26, 2026 23:15
The Antigravity 429 path now uses lockExactModel instead of the previous
family-scoped Gemini lockout, so a single-model exhaustion no longer
disables sibling models on the same account. Update the existing
'family cooldown starts around 30s' test to assert the new contract:

- cooldownMs is bounded short (<= 60s) instead of the inferred 30s+ family lock
- the exact failing model is locked (allRateLimited / cooldownScope=model)
- sibling models on the same connection stay eligible
- clearModelLock is the existing success-path hook that releases the lock

Refs diegosouzapw#8630
@diegosouzapw diegosouzapw changed the title fix(antigravity): lock full quota per exact model [v3.8.50] fix(antigravity): lock full quota per exact model Jul 27, 2026
@diegosouzapw diegosouzapw added the deferred-v3.8.50 Adiada para o ciclo v3.8.50 (validacao VPS, refactor, ou escopo grande) label Jul 27, 2026
@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.49 to release/v3.8.50 July 28, 2026 18:41
@diegosouzapw

Copy link
Copy Markdown
Owner

Re-homed to release/v3.8.50: v3.8.49 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

costaeder and others added 2 commits August 4, 2026 22:37
Resolves conflicts against release's own refactor of the Antigravity
retry loop (executeOnce -> runAntigravityAttempt/tryResolveRetryFromErrorBody)
and against diegosouzapw#8050's already-merged 404/not_found exact-model lockout,
by generalizing accountFallback.ts's key-lookup helpers to check all
3 lockout key shapes (quota-family, diegosouzapw#8050's literal-model 404 key, and
this PR's own exact-model key) instead of picking one side.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Extracts the exact-model (non-family-scoped) lockout key/entry logic
introduced for Antigravity into a new leaf module,
open-sse/services/accountFallback/exactModelLock.ts, following the same
DI pattern already used by lockoutEviction.ts and cooldownCap.ts. This
brings accountFallback.ts, antigravity.ts and chatCore.ts back under
their frozen file-size baselines without changing behavior.

Co-authored-by: costaeder <costaeder@users.noreply.github.com>
@diegosouzapw
diegosouzapw merged commit 0b4bc4f into diegosouzapw:release/v3.8.50 Aug 6, 2026
5 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…zapw#8630)

Validated in local merge-train T6 (ungrouped batch 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deferred-v3.8.50 Adiada para o ciclo v3.8.50 (validacao VPS, refactor, ou escopo grande)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants