Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

Classify G1 credit exhaustion as quota exhaustion #590

Description

@eddieparc

Summary

Gemini/Antigravity failures with Google RPC reason INSUFFICIENT_G1_CREDITS_BALANCE should be classified as quota exhaustion so account rotation can move away from the exhausted account.

Observed error

429 RESOURCE_EXHAUSTED
Resource has been exhausted (e.g. check quota).
reason: INSUFFICIENT_G1_CREDITS_BALANCE

Why this matters

This is account credit exhaustion, not transient model capacity. If it is parsed as unknown/transient, the caller can retry the same exhausted account instead of marking it quota-limited and selecting another Antigravity account.

Patch

I have a small patch that maps the explicit reason string and matching message text to QUOTA_EXHAUSTED, with regression coverage in src/plugin/accounts.test.ts.

Validation:

npm run typecheck
npm run build
npm test

All pass locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions