#21257: # feat: add Gemini 3.1 Pro (low/high reasoning) model support
channel: msteams
commands
agents
size: L
Cluster:
Gemini 3.1 Model Enhancements
## Summary
This PR implements **Gemini 3.1 model support** for:
- `google` (Google API provider)
- `google-antigravity`
The goal is to make Gemini 3.1 usable through OpenClaw’s existing model selection, catalog, and fallback paths for those two providers.
## What this adds
- Gemini 3.1 forward-compat resolution for `google` and `google-antigravity`
- Gemini 3.1 catalog synthesis so models appear even when upstream discovery still exposes Gemini 3 templates
- Gemini 3.1 model listing synthesis in `models list`
- Google-provider normalization alignment: Gemini 3.1 aliases follow the same preview-ID normalization pattern used by existing Google models
## Provider Scope
Implemented in this PR:
- `google`
- `google-antigravity`
Not implemented in this PR:
- `google-gemini-cli` Gemini 3.1
Reason: current upstream Cloud Code Assist responses for Gemini 3.1 are not reliably available in this environment (404 `Requested entity was not found`). This PR stays focused on the providers that are validated and working.
## Change Type
- [x] Feature
- [x] Bug fix
- [ ] Refactor
- [ ] Docs
- [ ] Security hardening
- [ ] Chore/infra
## Scope
- [x] Gateway / orchestration
- [x] Integrations
- [x] UI / DX (model catalog/list visibility)
- [ ] Skills / tool execution
- [ ] Auth / tokens
- [ ] Memory / storage
- [ ] API / contracts
- [ ] CI/CD / infra
## Linked Issue/PR
- Closes #21176
## User-visible behavior
- `google` now accepts and resolves Gemini 3.1 IDs through forward-compat behavior.
- `google-antigravity` resolves Gemini 3.1 aliases to runtime-safe low/high IDs.
- Gemini 3.1 entries now appear in model catalog/listing for these providers when templates exist.
## Verification
### Tests run
- `pnpm exec vitest run --config vitest.unit.config.ts src/agents/model-forward-compat.test.ts src/agents/model-catalog.test.ts src/commands/models.list.test.ts`
- Passed: 3 files, 36 tests
- `pnpm exec vitest run --config vitest.e2e.config.ts src/agents/models-config.normalizes-gemini-3-ids-preview-google-providers.e2e.test.ts`
- Passed: 1 file, 1 test
- `pnpm exec vitest run --config vitest.e2e.config.ts src/agents/pi-embedded-runner.applygoogleturnorderingfix.e2e.test.ts`
- Passed: 1 file, 2 tests
- `pnpm exec vitest run --config vitest.unit.config.ts src/media-understanding/providers/google/video.test.ts src/providers/google-shared.preserves-parameters-type-is-missing.test.ts`
- Passed: 2 files, 11 tests
### Smoke check
- `pnpm openclaw models list --provider google --all --json`
- Confirmed Gemini 3.1 entries are listed for `google`.
### Not verified
- Live inference against Google API with production credentials (credentials not configured in this environment).
- `google-gemini-cli` Gemini 3.1 live calls (out of scope for this PR).
## Compatibility / Migration
- Backward compatible: `Yes`
- Config/env changes required: `No`
- Migration required: `No`
Most Similar PRs
#21263: fix: add google-vertex support for Gemini 3.1 models
by pdd-cli · 2026-02-19
85.7%
#21181: fix(models): add gemini-3.1-pro-preview forward-compat for google-g...
by Mellowambience · 2026-02-19
84.3%
#22899: fix(models): synthesize antigravity Gemini 3.1 pro high/low models
by Phineas1500 · 2026-02-21
83.7%
#23034: Add Gemini 3.1 Pro to Google model normalizer and OpenCode Zen catalog
by Clawborn · 2026-02-21
83.5%
#23424: feat: add Gemini 3.1 Pro Preview support (google-gemini-cli)
by hongchanroh · 2026-02-22
80.8%
#23040: Upgrade default Google model to Gemini 3.1 Pro and add Venice catal...
by Clawborn · 2026-02-21
79.8%
#21920: fix(antigravity): map deprecated Gemini 3 Pro to Gemini 3.1 Pro
by Asm3r96 · 2026-02-20
79.5%
#22337: fix(models): add fallback Gemini 3.1 Pro Preview catalog entry
by AIflow-Labs · 2026-02-21
78.4%
#11464: feat(models): add forward-compat fallback for gemini-3-pro-image
by ben-milanko · 2026-02-07
78.0%
#16687: fix(antigravity): default to Gemini 3 Pro and remove broken depreca...
by vincentkoc · 2026-02-15
75.6%