← Back to PRs

#5210: Fix Antigravity server side checks and returning Version error

by Ivorisnoob open 2026-01-31 05:56 View on GitHub →
extensions: google-antigravity-auth agents size: XS
<img width="831" height="258" alt="image" src="https://github.com/user-attachments/assets/1897a8ca-f319-43d1-92ee-20ca00863f7e" /> This has been fixed and tested <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates the Google Antigravity integration to satisfy server-side client/version checks by changing the request metadata sent to Antigravity endpoints. Concretely: - The Antigravity OAuth extension now sends a new `Client-Metadata` payload when calling `loadCodeAssist` to discover the user’s project. - The Pi embedded runner injects Antigravity-specific headers (`User-Agent`, `X-Goog-Api-Client`, `Client-Metadata`) via the stream wrapper so model calls present the expected client identity. - The Antigravity usage fetcher (`provider-usage.fetch.antigravity.ts`) updates its `metadata` payload for `loadCodeAssist` to the same new format. Overall, this fits into the codebase’s provider plumbing by aligning the auth/usage/model-call surfaces to send consistent identifying headers/metadata to Google Antigravity APIs. <h3>Confidence Score: 3/5</h3> - This PR is likely safe to merge, but there is one behavioral risk around header merging that can undermine the intended fix. - Changes are localized and straightforward, but the new Antigravity header patch can be overwritten by caller-provided headers due to merge order, which could reintroduce the version-check failure. The remaining issues are maintainability concerns (duplicated hard-coded metadata). - src/agents/pi-embedded-runner/extra-params.ts <!-- greptile_other_comments_section --> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs