Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Antigravity usage limits omit Gemini quotas when retrieveUserQuotaSummary returns only 3p buckets #27473

ClosedAFG473319(GitHub profile, opens in a new tab) opened this issue 2 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Enable the Google Antigravity provider in T3 Code and authenticate via Google OAuth (generating antigravity-acp/acp_token.json).
  2. Trigger usage limit retrieval for Antigravity (e.g. view provider status / thread quota card or run the usage limits probe).
  3. Inspect the cached provider limits in ~/.t3/caches/antigravity.json or through the UI.

Expected behavior

T3 Code should retrieve and report quota windows for both Google Gemini models (e.g., Gemini 5-hour / weekly / tiered quotas) and 3rd-party models (Claude & GPT). If retrieveUserQuotaSummary does not include Gemini quota groups for the authenticated account, the probe should merge or fall back to fetchAvailableModels (which carries per-model quotaInfo / weeklyQuotaInfo) so that first-party Gemini quotas are present.

Actual behavior

Only third-party windows are reported:

"windows": [
  { "id": "3p-5h", "label": "Claude & GPT (shared) · 5-hour", "kind": "session", "usedPercent": 0, ... },
  { "id": "3p-weekly", "label": "Claude & GPT (shared) · Weekly", "kind": "weekly", "usedPercent": 0, ... }
]

No Gemini quota windows are reported at all. In the UI, the thread details card shows only the third-party (Claude & GPT) bucket even when active threads are running Gemini models.

Root cause analysis

In apps/server/src/provider/antigravityUsageLimits.ts:

const summary = yield* fetchWindows("retrieveUserQuotaSummary", (response) =>
  decodeSummary(response).pipe(Effect.map(summaryWindows)),
);
const windows = summary.length
  ? summary
  : yield* fetchWindows("fetchAvailableModels", (response) =>
      decodeModels(response).pipe(Effect.map(modelWindows)),
    );

For many accounts querying v1internal:retrieveUserQuotaSummary with the ACP OAuth token, the API response only includes the 3p-5h and 3p-weekly buckets under the third-party group, returning zero gemini-* buckets.

Because summary contains these two 3p windows, summary.length evaluates to 2 (truthy). As a result:

  • fetchAvailableModels is never called.
  • The windows list is set exclusively to summary.
  • No Gemini quota entries are ever fetched, decoded, or merged into the provider's reported usage limits.

Impact

Minor bug or occasional failure. Users running Gemini models through Antigravity cannot monitor their remaining Gemini quota allowances in T3 Code.

Version or commit

T3 Code Desktop 0.1.4 (serverVersion 0.1.4, verified against main @ 305a90dce44b8b7813d951662f13ce8510a3c669).

Environment

Windows 11 x64, T3 Code Desktop 0.1.4 (Electron), Antigravity provider (OAuth personal).

Suggested fix

Rather than treating fetchAvailableModels as an exclusive fallback only when summary.length === 0:

  1. Check whether summary contains first-party/Gemini quota windows (windows.some(w => w.id.startsWith("gemini-") || w.label.startsWith("Gemini"))).
  2. If absent, fetch fetchAvailableModels and merge its decoded modelWindows with summary, deduplicating by window ID or keeping the relevant entries.

Workaround

Query the per-model quota information directly from the local Antigravity language server / fetchAvailableModels endpoint via an external script.

  1. Additional user report on macOS with Antigravity / Gemini 4 Argon:

    • The Antigravity app shows approximately 20% of the weekly allowance already consumed.
    • T3 Code shows what the user describes as GPT/Claude limits twice, but no Gemini / Argon usage. The two entries may actually be the session and weekly third-party windows rather than literal duplicates; this has not been verified against the raw response.
    • The Antigravity app exposes separate Gemini and Claude allowances. The precise relationship between the general Gemini and Argon-specific pools has not been independently verified here.

    Impact: the missing Gemini/Argon quota made the model appear effectively unlimited in T3 until the user checked Antigravity itself. This can lead to unexpected weekly quota exhaustion when planning substantial agent tasks.

    Related: #24800 (closed) specifically covered missing Gemini and Gemini Argon windows and distinct Argon labeling. Please ensure any fix here also preserves Argon-specific quota information where the provider supplies it, rather than displaying only the third-party pool or collapsing distinct pools into an ambiguous Gemini label.

    Workaround: check usage directly in the Antigravity app.

    This is a user-observed report submitted with permission; no independent API-level reproduction, screenshots, or installed T3 version have been collected. No credentials or account identifiers are included.

  2. Closing as a duplicate of #23080.

    Correction to my root-cause analysis: the main trigger is the outdated User-Agent (antigravity/hub/1.0.0). For that client version, retrieveUserQuotaSummary returns only the 3p buckets on both endpoints, as shown in #24800. The summary.length fallback only explains why fetchAvailableModels never runs. The fix is tracked in #23011. Please make sure the Argon-specific quota (gemini-argon-*) gets its own label there too.

Sign in to join this conversation.