Skip to content

[FEATURE]: Support Google Antigravity OAuth account pooling & 429 failover #1413

Description

@ideabib

Feature Description

Currently, \opencodex\ supports account pooling, quota routing, and 429 failover for OpenAI/ChatGPT accounts (\openai\ provider) and Anthropic OAuth accounts (\�nthropicAccountPool). However, Google Antigravity OAuth (\google-antigravity) only supports manual active account selection via the dashboard or API.

When using Google Antigravity with multiple Google accounts (e.g., multiple Google AI Pro accounts), heavy tool-use sessions can hit rate limits (\429: Antigravity rate limit exceeded: Individual quota reached). Without automatic account pooling/failover, all requests fail until the rolling quota resets or the active account is manually switched.

Requested Capability

  1. Google Antigravity Account Pooling & Failover:

    • Allow \google-antigravity\ OAuth to manage multiple registered accounts in an account pool.
    • On encountering a \429\ or \RESOURCE_EXHAUSTED\ response from Google Antigravity, put the failing account into a temporary cooldown window (honoring \Retry-After\ header or default backoff).
    • Automatically fail over in-flight or subsequent requests to the next available healthy Google account.
    • Update \�ctiveAccountId\ in \�uth.json\ / dashboard state.
  2. Session Affinity & Selection Strategy:

    • Maintain session affinity (sticky account binding per session/thread key) so active multi-turn conversations remain on their assigned account until rate-limited.
    • Support lowest-usage or round-robin selection for new sessions.
  3. Dashboard Quota View:

    • Aggregate per-account quota status so registered Google accounts show their remaining fraction and reset time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolOAuth, credentials, Codex pool, quota, failover, plansenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions