Skip to content

fix: bypass soft quota check for gemini-cli requests #400

@xzipyx

Description

@xzipyx

Problem

The AccountManager incorrectly applies the Antigravity soft quota check to gemini-cli requests. When an account has exhausted its Antigravity quota (100% usage), isOverSoftQuotaThreshold returns true. This causes the account selection logic to skip the account, even if cli_first is enabled or the CLI pool is explicitly requested.

Impact

Users cannot utilize the gemini-cli pool as a fallback when their Antigravity quota is full.

Proposed Fix

Modify src/plugin/accounts.ts to bypass the soft quota check when the requested headerStyle is gemini-cli.

Changes in src/plugin/accounts.ts

  • Updated getCurrentOrNextForFamily (both hybrid and sticky paths) to skip quota threshold checks for CLI requests.
  • Updated getNextForFamily filter logic to allow CLI requests to proceed regardless of Antigravity quota status.

Verification

Verified locally with a new test case in src/plugin/accounts.test.ts and confirmed via debug logs that gemini-cli requests now proceed when Antigravity quota is exhausted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/configConfiguration files, setupbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions