Skip to content

fix(models): add Gemini 3.1 Pro/Flash to google-gemini-cli provider catalog#27425

Open
rish2jain wants to merge 1 commit intoopenclaw:mainfrom
rish2jain:fix/gemini-cli-model-catalog-22559
Open

fix(models): add Gemini 3.1 Pro/Flash to google-gemini-cli provider catalog#27425
rish2jain wants to merge 1 commit intoopenclaw:mainfrom
rish2jain:fix/gemini-cli-model-catalog-22559

Conversation

@rish2jain
Copy link
Contributor

Summary

Closes #22559, #23007.

Users authenticated via the Gemini CLI OAuth provider (google-gemini-cli) could not select gemini-3.1-pro-preview or gemini-3.1-flash-preview — the models showed as configured,missing because the google-gemini-cli provider's catalog was not updated when Gemini 3.1 landed.

What changed

  • src/agents/models-config.providers.ts: Added buildGoogleGeminiCliProvider() that defines an explicit model catalog for the google-gemini-cli provider (Gemini 3.0 + 3.1 Pro/Flash), and wired it into resolveImplicitProviders() so the catalog is written to models.json whenever a google-gemini-cli auth profile exists.
  • extensions/google-gemini-cli-auth/index.ts: Updated DEFAULT_MODEL from gemini-3-pro-previewgemini-3.1-pro-preview so fresh OAuth flows default to the latest model.
  • src/commands/google-gemini-model-default.ts: Updated GOOGLE_GEMINI_DEFAULT_MODEL to google/gemini-3.1-pro-preview.
  • src/config/defaults.ts: Updated gemini alias to resolve to gemini-3.1-pro-preview; added gemini-3 and gemini-3-flash aliases for backward compatibility.
  • src/agents/models-config.gemini-cli-catalog.test.ts: Unit tests covering model IDs, reasoning flags, context windows, API type, and input modalities.

Backward compatibility

  • Existing configs pinned to google-gemini-cli/gemini-3-pro-preview continue to work — both 3.0 models remain in the catalog.
  • The gemini-3 and gemini-3-flash short aliases are added so existing alias users aren't broken.

Change Type

  • Bug fix

Scope

  • Skills / tool execution

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No — reuses existing google-gemini-cli OAuth profile
  • New/changed network calls? No — same API endpoint as before

Testing

pnpm vitest run src/agents/models-config.gemini-cli-catalog.test.ts
# 8 tests passed

Made with Cursor

@openclaw-barnacle openclaw-barnacle bot added extensions: google-gemini-cli-auth Extension: google-gemini-cli-auth commands Command implementations agents Agent runtime and tooling size: S labels Feb 26, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 26, 2026

Greptile Summary

Fixed missing Gemini 3.1 models in google-gemini-cli provider catalog by adding buildGoogleGeminiCliProvider() function that explicitly defines model catalog including both Gemini 3.0 (backward compatibility) and 3.1 (Pro/Flash) models, and wired it into resolveImplicitProviders() so users authenticated via Gemini CLI OAuth can now select 3.1 models.

  • Updated default model references from gemini-3-pro-preview to gemini-3.1-pro-preview across extension, commands, and config defaults
  • Added backward-compatible aliases (gemini-3, gemini-3-flash) so existing configs continue to work
  • Added comprehensive unit tests covering model IDs, reasoning flags, API type, context windows, and input modalities
  • Implementation follows existing patterns (e.g., buildMinimaxProvider(), buildMinimaxPortalProvider())

One minor point to verify: gemini-3.1-flash-preview is marked with reasoning: true, which differs from the Gemini 3.0 Flash pattern where reasoning: false. Worth confirming this is intentional.

Confidence Score: 4/5

  • This PR is safe to merge with one minor verification recommended
  • Score reflects solid implementation following existing patterns, comprehensive test coverage, and proper backward compatibility. Minor deduction for uncertainty about Gemini 3.1 Flash reasoning capability, which should be verified against Google's model specifications
  • Verify the reasoning flag for gemini-3.1-flash-preview in src/agents/models-config.providers.ts

Last reviewed commit: 25350ef

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +504 to +506
id: "gemini-3.1-flash-preview",
name: "Gemini 3.1 Flash",
reasoning: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that gemini-3.1-flash-preview should have reasoning: true. This differs from gemini-3-flash-preview (3.0) which has reasoning: false (line 487).

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/models-config.providers.ts
Line: 504-506

Comment:
Check that `gemini-3.1-flash-preview` should have `reasoning: true`. This differs from `gemini-3-flash-preview` (3.0) which has `reasoning: false` (line 487).

How can I resolve this? If you propose a fix, please make it concise.

rish2jain added a commit to rish2jain/openclaw that referenced this pull request Feb 26, 2026
@openclaw-barnacle
Copy link

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added the stale Marked as stale due to inactivity label Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations extensions: google-gemini-cli-auth Extension: google-gemini-cli-auth size: S stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Antigravity Gemini 3 is gone

1 participant