Skip to content

fix(antigravity): align User-Agent token order and auth_method with 2.5.5 decompilation - #1891

Merged
lidge-jun merged 3 commits into
lidge-jun:devfrom
dbc-hbin:fix/antigravity-ua-parity
Aug 18, 2026
Merged

fix(antigravity): align User-Agent token order and auth_method with 2.5.5 decompilation#1891
lidge-jun merged 3 commits into
lidge-jun:devfrom
dbc-hbin:fix/antigravity-ua-parity

Conversation

@dbc-hbin

@dbc-hbin dbc-hbin commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Align token order and components in antigravityUserAgent with the decompiled Antigravity 2.5.5 Go Language Server (codeassistclient.(*CodeAssistClient).setHeaders @ 0x1018fbe00):

  • Decompiled token sequence: os_type=%sarch=%saidev_clientauth_method=%s (joined with ; ).
  • Enclosing format: antigravity/ide/%s (%s) using subclient (ide) and version (2.5.5).
  • Resulting User-Agent: antigravity/ide/2.5.5 (os_type=windows; arch=amd64; aidev_client; auth_method=oauth).
  • Wire adapter: Use antigravityUserAgent() directly for ANTIGRAVITY_REQUEST_UA to ensure shared trimmed override handling.
  • Configurability: Parameterized authMethod on antigravityUserAgent(version, authMethod = "oauth").

Evidence & Verification

  • Decompiled binary: language_server_macos_arm 126MB Go1.26.5 (setHeaders @ 0x1018fbe00).
  • Live Wire Test with Active OAuth Token (daily-cloudcode-pa.googleapis.com):
    • fetchAvailableModels: Returns all 28 models including gemini-3.7-flash-{low,medium,high} (200 OK).
    • generateContent (gemini-3.7-flash-low): Returns 200 OK with streaming completion.
  • Local Tests:
    • bun test tests/client-fingerprint.test.ts tests/google-antigravity-wire.test.ts tests/google-antigravity-oauth.test.ts (75 passed, 0 failed)
    • bun run typecheck (0 errors)

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.
  • I pushed my PR to the latest dev commit.
  • I resolved all correct Codex and CodeRabbit findings.
  • My PR is ready for review.

Summary by CodeRabbit

  • Improvements
    • Updated Antigravity request identification to include operating system, architecture, client, and authentication method details in a consistent order.
    • Added support for customized user-agent values, including whitespace trimming and fallback to the default when no valid override is provided.
    • Standardized Google Antigravity requests to use the updated user-agent format.

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

Labels

bug Something isn't working review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants