fix: add google-vertex support for Gemini 3.1 models#21263
fix: add google-vertex support for Gemini 3.1 models#21263pdd-cli wants to merge 5 commits intoopenclaw:mainfrom
Conversation
|
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. |
|
Flagging a potential link: 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. |
0006cd4 to
de5d9cb
Compare
Adds a DiscordMemberAddListener that fires when a user joins a Discord guild and delivers a system event to the matched agent session. Gated on the existing intents.guildMembers privileged intent flag (must also be enabled in the Discord Developer Portal). Opt-in per guild via memberJoinNotifications: 'on' (default: 'off' to avoid high-volume floods on existing deployments). Closes openclaw#23978
Two issues prevented google-vertex/gemini-3.1-pro-preview from working: 1. live-model-filter.ts: isModernModelRef() only recognized "google" and "google-gemini-cli" providers but not "google-vertex", causing the model to fail the modern model filter. 2. model-forward-compat.ts: pi-ai's built-in catalog doesn't include gemini-3.1-* models yet. Added a forward-compat handler that clones the gemini-3-pro-preview / gemini-3-flash-preview templates for the corresponding gemini-3.1-* model IDs, matching the existing pattern used for Anthropic and OpenAI forward-compat models. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The customtools variant is a Vertex AI model tuned for agentic workflows that prioritize custom tool calls over bash fallbacks. Clone it from gemini-3-pro-preview like the base 3.1 model. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
de5d9cb to
7509950
Compare
Summary
live-model-filter.ts:isModernModelRef()now recognizesgoogle-vertexas a valid provider alongsidegoogleandgoogle-gemini-cli. Previously,google-vertex/gemini-3.1-pro-previewfell through toreturn false, causing "Unknown model" errors.model-forward-compat.ts: Added forward-compat handler forgemini-3.1-*models that clones the correspondinggemini-3-*template from pi-ai's built-in catalog. This follows the same pattern used forclaude-opus-4-6(fromclaude-opus-4-5) andgpt-5.3-codex(fromgpt-5.2-codex).Context
Google released Gemini 3.1 Pro on Feb 19, 2026. Users configuring
google-vertex/gemini-3.1-pro-previewhit two independent failures:google-vertexas a Google providergemini-3.1-pro-previewin pi-ai's catalog (which only hasgemini-3-pro-preview)Both fixes are needed — the filter fix alone isn't sufficient since the model still wouldn't resolve from the registry.
Test plan
google-vertex/gemini-3.1-pro-previewresolves without errorgoogle-vertex/gemini-3.1-flash-previewresolves without errorgoogle-vertex/gemini-3-pro-previewstill worksgoogle/gemini-3.1-pro-previewalso works (forward-compat covers all Google providers)🤖 Generated with Claude Code
Greptile Summary
Adds support for Google Vertex AI's newly released Gemini 3.1 models (
gemini-3.1-pro-previewandgemini-3.1-flash-preview). The fix addresses two independent failures:isModernModelRef()now recognizesgoogle-vertexas a valid Google provider (line 59), allowing Gemini 3.1 requests to pass validationresolveGoogleGemini31ForwardCompatModel()clones the corresponding Gemini 3 template configurations (gemini-3-pro-preview→gemini-3.1-pro-preview,gemini-3-flash-preview→gemini-3.1-flash-preview) when the 3.1 models aren't found in pi-ai's catalogThe implementation follows established patterns from other forward-compat handlers (claude-opus-4-6, gpt-5.3-codex, glm-5) and works across all Google provider variants (
google-vertex,google,google-gemini-cli).Confidence Score: 5/5
google-vertexprovider recognition, and the forward-compat handler ensures model resolution when the catalog lacks 3.1 entries. The implementation is conservative (explicit mapping vs wildcard matching), well-documented, and consistent with other forward-compat functions.Last reviewed commit: 8cae4e9
(2/5) Greptile learns from your feedback when you react with thumbs up/down!