Skip to content

feat(ai): add Gemini 3.1 Pro support for google-antigravity provider#1691

Closed
yorha59 wants to merge 1 commit intobadlogic:mainfrom
yorha59:fix/antigravity-gemini-31-support
Closed

feat(ai): add Gemini 3.1 Pro support for google-antigravity provider#1691
yorha59 wants to merge 1 commit intobadlogic:mainfrom
yorha59:fix/antigravity-gemini-31-support

Conversation

@yorha59
Copy link

@yorha59 yorha59 commented Feb 28, 2026

Summary

Add Gemini 3.1 Pro model support for the google-antigravity provider.

Google has deprecated Gemini 3 Pro (the sandbox now returns "Gemini 3 Pro is no longer available. Please switch to Gemini 3.1 Pro"), so this PR adds the new model variants.

Changes

1. packages/ai/scripts/generate-models.ts

  • Added gemini-3.1-pro-high and gemini-3.1-pro-low to the antigravityModels array

2. packages/ai/src/models.generated.ts

  • Added corresponding model entries for gemini-3.1-pro-high and gemini-3.1-pro-low under the google-antigravity provider

3. packages/ai/src/providers/google-gemini-cli.ts

  • Updated DEFAULT_ANTIGRAVITY_VERSION from 1.15.8 to 1.18.0 (required — the sandbox returns "not available on this version. Please upgrade" for UA < 1.18.0)

Testing

  • Verified both gemini-3.1-pro-high and gemini-3.1-pro-low return 200 OK from the antigravity sandbox API
  • Tested via OpenClaw with real conversations — reasoning and tool use work correctly
  • Confirmed older models (gemini-3-pro-high, gemini-3-flash) still work with the new UA version

Notes

  • Model IDs follow the existing naming convention: gemini-3.1-pro-high (deeper reasoning) and gemini-3.1-pro-low (faster, lighter reasoning)
  • The UA version bump to 1.18.0 is required by Google's sandbox — versions below 1.18.0 are rejected for 3.1 models
  • gemini-3.1-pro (without suffix) returns 404; the -high/-low suffix is mandatory

- Add gemini-3.1-pro-high and gemini-3.1-pro-low to antigravity model registry
- Update DEFAULT_ANTIGRAVITY_VERSION from 1.15.8 to 1.18.0
  (Google sandbox requires UA >= 1.18.0 for Gemini 3.1 models)
- Gemini 3 Pro has been deprecated by Google ('please switch to 3.1')

Verified via direct API testing against the Antigravity sandbox endpoint:
  - gemini-3.1-pro-low with UA 1.18.0: 200 OK ✅
  - gemini-3.1-pro-high with UA 1.18.0: 200 OK ✅
  - gemini-3.1-pro-low with UA 1.15.8: 'upgrade to latest version' ❌
  - gemini-3-pro-low: 'switch to Gemini 3.1 Pro' (deprecated)
@github-actions
Copy link
Contributor

Hi @yorha59, thanks for your interest in contributing!

We ask new contributors to open an issue first before submitting a PR. This helps us discuss the approach and avoid wasted effort.

Next steps:

  1. Open an issue describing what you want to change and why (keep it concise, write in your human voice, AI slop will be closed)
  2. Once a maintainer approves with lgtm, you'll be added to the approved contributors list
  3. Then you can submit your PR

This PR will be closed automatically. See https://github.com/badlogic/pi-mono/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions bot closed this Feb 28, 2026
@51616
Copy link

51616 commented Feb 28, 2026

I was gonna post a PR but I guess I'm an hour late lol.

I know I'm not the maintainer but a nice UX improvement would be to make the thinking options for -low to be only {off,low} and -high to be only {off,high}.

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.

2 participants