Skip to content

[Bug]: Antigravity cloud endpoint omits Gemini Models quota pool due to outdated User-Agent (2.1.1) #133

Closed

Description

@SlobCoder

Plugin version

2.5.0 (15b29f6)

Area

Provider usage helper

Environment

  • Dux Shell: dms v2.1.0-268-g6a6c5f745
  • Quickshell: 0.3.2
  • Compositor: Hyprland (Wayland)
  • Distro: CachyOS
  • bash/jq/curl: bash 5.3.20 / jq 1.8.2 / curl 8.23.0

Steps to reproduce

  1. Run ./providers/get-antigravity-usage without a running Antigravity IDE local language server (or with ANTIGRAVITY_NO_LOCAL_RPC=1), so the adapter queries daily-cloudcode-pa.googleapis.com/v1internal:retrieveUserQuotaSummary directly.
  2. Inspect the returned accounts[0].windows array.

Expected behavior

v1internal:retrieveUserQuotaSummary returns both the Gemini Models (5h and Weekly) and Claude & OpenAI Models (5h and Weekly) quota pools.

Actual behavior

Only Claude & OpenAI Models (5h and Weekly) are returned. The Gemini Models quota pool is completely missing from the cloud response.

Local checks

Testing v1internal:retrieveUserQuotaSummary on daily-cloudcode-pa.googleapis.com with different User-Agent and X-Client-Version headers shows that the backend gates the Gemini Models group specifically on the User-Agent version (>= 2.6.0), not on X-Client-Version:

# Isolating User-Agent vs X-Client-Version:
UA=antigravity/ide/2.1.1 darwin/arm64, X-Client-Version=2.1.1 -> ["Claude and GPT models"]
UA=antigravity/ide/2.1.1 darwin/arm64, X-Client-Version=3.0.0 -> ["Claude and GPT models"]
UA=antigravity/ide/3.0.0 darwin/arm64, X-Client-Version=2.1.1 -> ["Gemini Models","Claude and GPT models"]

# Version threshold check:
UA=antigravity/ide/2.1.1 darwin/arm64 -> ["Claude and GPT models"]
UA=antigravity/ide/2.5.0 darwin/arm64 -> ["Claude and GPT models"]
UA=antigravity/ide/2.6.0 darwin/arm64 -> ["Gemini Models","Claude and GPT models"]

Root cause & suggested fix

  • providers/native/antigravity.bash defaults ANTIGRAVITY_USER_AGENT to antigravity/ide/2.1.1 darwin/arm64.
  • providers/get-provider-usage hard-codes -H "X-Client-Version: 2.1.1" in antigravity_fetch_account.

Bumping the default client version from 2.1.1 to at least 2.6.0 (e.g. via an overridable ANTIGRAVITY_CLIENT_VERSION default used by both User-Agent and X-Client-Version) immediately restores the Gemini Models (5h) and Gemini Models (Weekly) windows from the cloud endpoint — even without a running IDE language server.

Activity

  1. bernardopg commented on Nov 22, 2026

    @bernardopg
    Owner

    Thanks for the report, @SlobCoder. The matrix isolating User-Agent vs X-Client-Version and the version threshold check was excellent — it made it very clear that the Gemini Models pool gate was on the client User-Agent/version.

    What was happening

    The Antigravity cloud path defaulted to antigravity/ide/2.1.1 darwin/arm64 as the User-Agent and sent a hardcoded X-Client-Version: 2.1.1. Because of that, daily-cloudcode-pa.googleapis.com/v1internal:retrieveUserQuotaSummary returned only the Claude/OpenAI pool; the Gemini 5h/Weekly pools were missing.

    Fix

    I opened PR #137 with the fix:

    • ANTIGRAVITY_CLIENT_VERSION now defaults to 2.6.0 (the lowest version you validated as sufficient).
    • The default User-Agent is derived from that version: antigravity/ide/${ANTIGRAVITY_CLIENT_VERSION} darwin/arm64.
    • X-Client-Version uses the same version.
    • ANTIGRAVITY_CLIENT_VERSION remains configurable for forward compatibility.
    • The Antigravity live test now asserts the headers and the override.

    I also updated docs/configuration.md and docs/providers.md to document ACP discovery and ANTIGRAVITY_CLIENT_VERSION.

    Validation

    I ran locally:

    • bash tests/test-antigravity-live.sh
    • bash -n providers/native/antigravity.bash providers/get-provider-usage
    • shellcheck -S warning providers/native/antigravity.bash

    When PR #137 is merged and you update, could you confirm whether the Gemini Models (5h) and Gemini Models (Weekly) pools show up again in your cloud/fallback environment? If any pool is still missing, please let me know with the scenario (no tokens/sessions) and I’ll keep digging. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions