Skip to content

fix(antigravity): align CloudCode IDE version with modern Antigravity to restore Gemini quota buckets (#2832) - #2838

Open
DuolaD wants to merge 1 commit into
jlcodes99:mainfrom
DuolaD:fix/antigravity-quota-version-gate
Open

DuolaD wants to merge 1 commit into
jlcodes99:mainfrom
DuolaD:fix/antigravity-quota-version-gate

Conversation

@DuolaD

@DuolaD DuolaD commented Oct 16, 2026

Copy link
Copy Markdown

Related Issue

Fixes #2832

Problem Description

Recently, Antigravity accounts have been displaying identical percentages and reset countdowns for both the Five-Hour Limit and the Weekly Limit (e.g., both showing 92% with the exact same reset timestamp). This issue simultaneously affected current releases (v1.3.70) as well as earlier, untouched installations (e.g., v1.3.68, v1.3.66).

Root Cause Analysis

Through traffic inspection with the official running Language Server and empirical version-gradient API testing against Google Cloud Code PA:

  1. Upstream Version Gating:

    • The upstream endpoint /v1internal:retrieveUserQuotaSummary recently introduced server-side version filtering based on the User-Agent header (antigravity/<version>).
    • When the client reports an IDE version < 2.10.0 (such as the legacy hardcoded fallback 1.20.5), Google's backend silently strips the Gemini Models group entirely, only returning Claude and GPT models.
    • When reporting a modern IDE version >= 2.10.0 (e.g., current official version 2.23.1), the backend returns both Gemini Models (gemini-weekly & gemini-5h) and Claude and GPT models.
  2. Detection Failure & Fallback to 1.20.5:

    • Cockpit Tools historically defaulted to DEFAULT_CLOUD_CODE_IDE_VERSION = "1.20.5" whenever local IDE version detection was unavailable.
    • On macOS, the default detection path was set to /Applications/Antigravity IDE.app, whereas the official application bundle is /Applications/Antigravity.app. Additionally, cross-platform settings synchronization (e.g., syncing a Windows path to macOS) caused local path resolution to fail, causing Cockpit Tools to fall back to 1.20.5.
    • Consequently, when Google rolled out the version gate on their server side, all versions of Cockpit Tools relying on the 1.20.5 fallback were impacted simultaneously.
  3. Presentation Fallback Duplication:

    • Because gemini-weekly and gemini-5h buckets were missing from the quota summary, the frontend presentation logic fell back to standard model pool entries (gemini-2.5-flash and gemini-3.5-flash-extra-low).
    • In fetchAvailableModels, standard Gemini models share identical quota and reset countdowns, causing the UI to render two rows with the exact same numbers.

Proposed Changes

  1. Bump Default IDE Version & User-Agent (crates/.../quota.rs & src-tauri/.../quota.rs):
    • Updated DEFAULT_CLOUD_CODE_IDE_VERSION and default User-Agent constants from 1.20.5 to 2.23.1, satisfying upstream CloudCode PA version gating even when running standalone or when path resolution fails.
  2. Improve Default Application Path Resolution (crates/.../wakeup_gateway.rs & src-tauri/.../wakeup_gateway.rs):
    • macOS: Prioritize /Applications/Antigravity.app while retaining backward compatibility for /Applications/Antigravity IDE.app.
    • Windows: Added support for LOCALAPPDATA/Programs/antigravity and Antigravity directory candidates.

Verification

  • API Gradient Verification: Confirmed that antigravity/2.23.1 retrieves both Gemini Models (gemini-weekly & gemini-5h) and Claude and GPT models as expected.
  • Unit Tests: Ran cargo test -p cockpit-core -- --test-threads=1; all 163 tests passed cleanly.
  • Local Runtime Build: Packaged and launched the macOS arm64 application bundle; verified that the Weekly and 5-Hour quotas now independently reflect their distinct percentages and reset countdowns.

Before:
Image

After:
Image

Build and Test on MacOS 27.0.1 ARM Platform.

… to restore Gemini quota buckets

- Upgrade DEFAULT_CLOUD_CODE_IDE_VERSION and fallback User-Agent from 1.20.5 to 2.23.1 to satisfy upstream CloudCode PA version gating (>=2.10.0) which omitted Gemini Models quota buckets
- Add /Applications/Antigravity.app to macOS default app path search candidates
- Add antigravity and Antigravity directories to Windows default app path search candidates
- Fixes jlcodes99#2832
@DuolaD

DuolaD commented Oct 16, 2026

Copy link
Copy Markdown
Author

#2832

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Antigravity 的周额度无法正常显示

1 participant