Skip to content

fix(antigravity): cap weekly reset cooldowns and keep them model-scoped - #5845

Open
rome-xi wants to merge 1 commit into
router-for-me:devfrom
rome-xi:fix/antigravity-weekly-reset-cooldown-cap
Open

rome-xi wants to merge 1 commit into
router-for-me:devfrom
rome-xi:fix/antigravity-weekly-reset-cooldown-cap

Conversation

@rome-xi

@rome-xi rome-xi commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Antigravity weekly quota resets can advertise ~166h Retry-After / quotaResetDelay. That duration was applied unbounded, so decideAntigravity429 treated long per-model RATE_LIMIT_EXCEEDED as full quota and the conductor latched NextRecoverAt (and shortCool) for days. One model's weekly exhaustion then kept healthy sibling models on the same credential out of rotation.

This change:

  • Caps hinted Antigravity reset/cooldown durations at 24h so a weekly prediction cannot strand a model for a week.
  • Keeps long per-model RATE_LIMIT_EXCEEDED resets model-scoped (rotate that model) instead of parking the whole credential.
  • Leaves short-cooldown rotate-account behavior and true QUOTA_EXHAUSTED full-quota handling intact.

Fixes #5843

Test plan

  • go test ./internal/runtime/executor -run 'TestClassifyAntigravity429|TestNewAntigravityStatusErr_WeeklyResetHintIsCapped|TestAntigravityExecutor_WeeklyModelResetDoesNotBlockSibling'
  • 166h weekly hint is capped at 24h
  • Sibling model on the same credential remains selectable after one model's weekly latch
  • Short (90s) rate-limit rotate-account delay is unchanged
  • QUOTA_EXHAUSTED remains full-quota (still duration-capped)

Antigravity 429s with multi-day weekly reset hints (e.g. 166h) were
classified as full quota and latched into Retry-After / NextRecoverAt
with no ceiling, so one model's weekly exhaustion could park healthy
siblings on the same credential. Cap hinted cooldown durations at 24h
and treat long RATE_LIMIT_EXCEEDED resets as model-scoped rotate-account
cooldowns, leaving short-cooldown and true QUOTA_EXHAUSTED paths intact.

Fixes router-for-me#5843
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T07:40:16.488030Z c3e896c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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