# feat: add Gemini 3.1 Pro (low/high reasoning) model support#21257
# feat: add Gemini 3.1 Pro (low/high reasoning) model support#21257GhadiSaab wants to merge 13 commits intoopenclaw:mainfrom
Conversation
Add gemini-3.1-pro-low-preview and gemini-3.1-pro-high-preview to the model catalog so they are recognized across google, google-gemini-cli, google-antigravity, opencode, openrouter, and venice providers. Closes openclaw#21176 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: add Gemini 3.1 Pro (low/high reasoning) model support
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Split the 120-char one-liner provider check into multiple lines to fix oxfmt format check failure in CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
oxlint's prefer-set-has rule requires using Set.has() instead of Array.includes() for membership checks on constant collections. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hey there! Thanks for adding support for Gemini 3.1. Would it be possible to also add the According to the official Google documentation, this specific variant is explicitly optimized for agentic workflows that rely on bash and custom tools, which makes it particularly relevant for OpenClaw's architecture. It would be amazing to have native support for this endpoint out of the box! Thanks for your hard work on this. |
Hey, this is a great idea, I hadn't thought of it! I implemented the changes. |
|
Eagerly awaiting this merge 😓 |
trust me, me too, literally coding it in class😭 |
|
So this should work for antigravity provider too right? |
yes it should. you can test it locally |
hey, i just checked, i think thru googles api it would be possible but thru antigravity and gemini cli not since the model is not there. ill try to implement it only for the api but i cant promise anything yet |
works like charm, thanks a lot! |
i didnt really understand, but this PR is the one i worked on to add support for gemini 3.1. I beleive it can be merged at this point. i have been using my integration of gemini 3.1 since yesterday and can say it works well. test it locally. i would like for this pr to be merged if possible |
|
This could be relevant to what you're working on. Several other PRs seem to address the same problem:
Both PRs add Gemini 3.1 model support to OpenClaw providers — PR#21263 targets google-vertex, PR#21257 targets google and google-antigravity. Both approaches have merit — might be worth coordinating. If any of these links don't look right, let me know and I'll correct them. |
|
I can confirm this PR addresses the root cause of the 404 errors with Root cause: The Antigravity Cloud Code Assist API requires the thinking-tier suffix ( I verified this by comparing how This PR correctly adds Tested manually by patching the compiled dist files with the equivalent changes — Gemini 3.1 Pro works correctly via Antigravity after the fix. See #24071 for detailed root cause analysis. |
|
good catch @MondoBoricua — the opencode-antigravity-auth comparison is exactly the right reference point. the for context, PR #21181 takes a slightly different approach to the same problem — worth a quick look to see if either implementation has edge cases the other misses before merging. happy to test against both if that helps the reviewers. |
hello, thanks for the clarifications. When do you think this and the other PRs can be merged ? |
|
thanks @MondoBoricua for the detailed confirmation — the root cause analysis lines up exactly with what i found. the @GhadiSaab on merge timeline — that's up to the maintainers, but from my end this PR is ready. MondoBoricua's manual verification removes the last open question. re: coordination with #21181 and #21263 — #21181 is mine and covers the forward-compat alias for pinging for review: the PRs can likely be merged in parallel without conflict. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
not stale — gemini 3.1 pro support is still needed and the implementation is solid. root cause confirmed via manual testing by @MondoBoricua (antigravity api requires |



Summary
This PR implements Gemini 3.1 model support for:
google(Google API provider)google-antigravityThe 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
googleandgoogle-antigravitymodels listProvider Scope
Implemented in this PR:
googlegoogle-antigravityNot implemented in this PR:
google-gemini-cliGemini 3.1Reason: 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
Scope
Linked Issue/PR
User-visible behavior
googlenow accepts and resolves Gemini 3.1 IDs through forward-compat behavior.google-antigravityresolves Gemini 3.1 aliases to runtime-safe low/high IDs.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.tspnpm exec vitest run --config vitest.e2e.config.ts src/agents/models-config.normalizes-gemini-3-ids-preview-google-providers.e2e.test.tspnpm exec vitest run --config vitest.e2e.config.ts src/agents/pi-embedded-runner.applygoogleturnorderingfix.e2e.test.tspnpm 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.tsSmoke check
pnpm openclaw models list --provider google --all --jsongoogle.Not verified
google-gemini-cliGemini 3.1 live calls (out of scope for this PR).Compatibility / Migration
YesNoNo