← Back to PRs

#22899: fix(models): synthesize antigravity Gemini 3.1 pro high/low models

by Phineas1500 open 2026-02-21 20:11 View on GitHub →
commands agents size: M
## Summary - add forward-compat support for `google-antigravity/gemini-3-1-pro-high` and `google-antigravity/gemini-3-1-pro-low` - map those model ids (including dot variants `gemini-3.1-*`) to existing Gemini 3 template entries when provider catalogs lag - include these synthesized models in `models list` registry augmentation and availability propagation - extend `models.list` tests for both missing/available template scenarios - add focused forward-compat unit tests for Gemini 3.1 antigravity mapping ## Testing - `pnpm vitest run src/commands/models.list.test.ts -t "gemini 3.1"` (new tests pass; run exits non-zero in this environment due unrelated Node 18 `undici`/`File` runtime issue) - `pnpm vitest run src/agents/model-forward-compat.antigravity-gemini31.test.ts` (tests pass; run exits non-zero in this environment due unrelated Node 18 `undici`/`File` runtime issue) ## AI Transparency - [x] AI-assisted - [x] Lightly tested (targeted tests) Fixes #22492 <!-- greptile_comment --> <h3>Greptile Summary</h3> Added forward-compatibility support for `google-antigravity/gemini-3-1-pro-high` and `google-antigravity/gemini-3-1-pro-low` models by mapping them to existing Gemini 3 template entries when provider catalogs don't yet include these newer models. **Changes:** - Implemented `resolveAntigravityGemini31ForwardCompatModel` in `model-forward-compat.ts` following the established pattern for model version mapping - Extended registry augmentation in `list.registry.ts` to include synthesized Gemini 3.1 models in the models list - Added focused unit tests for the forward-compat resolution logic - Extended integration tests to verify both unavailable and available template scenarios - Reordered imports to place type imports before regular imports (follows TypeScript best practices) **Implementation notes:** - Supports both dash (`gemini-3-1-pro-high`) and dot (`gemini-3.1-pro-high`) notation variants - Properly propagates availability status from template models to synthesized models - Follows the exact same pattern as existing Opus 4.6 forward-compatibility implementation <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The implementation follows established patterns exactly, with comprehensive test coverage for both unit and integration scenarios. The changes are purely additive (no modifications to existing logic), and the code closely mirrors the already-working Opus 4.6 forward-compatibility implementation. Import reordering follows TypeScript best practices and has no runtime impact. - No files require special attention <sub>Last reviewed commit: 1da7db2</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs