#22899: fix(models): synthesize antigravity Gemini 3.1 pro high/low models
commands
agents
size: M
Cluster:
Gemini 3.1 Model Enhancements
## 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
#21263: fix: add google-vertex support for Gemini 3.1 models
by pdd-cli · 2026-02-19
86.3%
#11464: feat(models): add forward-compat fallback for gemini-3-pro-image
by ben-milanko · 2026-02-07
85.8%
#21181: fix(models): add gemini-3.1-pro-preview forward-compat for google-g...
by Mellowambience · 2026-02-19
84.8%
#21257: # feat: add Gemini 3.1 Pro (low/high reasoning) model support
by GhadiSaab · 2026-02-19
83.7%
#22337: fix(models): add fallback Gemini 3.1 Pro Preview catalog entry
by AIflow-Labs · 2026-02-21
81.5%
#23034: Add Gemini 3.1 Pro to Google model normalizer and OpenCode Zen catalog
by Clawborn · 2026-02-21
81.2%
#16687: fix(antigravity): default to Gemini 3 Pro and remove broken depreca...
by vincentkoc · 2026-02-15
80.3%
#23424: feat: add Gemini 3.1 Pro Preview support (google-gemini-cli)
by hongchanroh · 2026-02-22
80.2%
#23040: Upgrade default Google model to Gemini 3.1 Pro and add Venice catal...
by Clawborn · 2026-02-21
79.3%
#13119: fix: add forward-compat for google-antigravity claude-opus-4-6 models
by sdb001 · 2026-02-10
79.0%