Skip to content

feat(models): declare reasoning efforts for gemini - #3349

Merged
steebchen merged 3 commits into
theopenco:mainfrom
AmineAce:feat/reasoning-google-vertex
Aug 3, 2026
Merged

steebchen merged 3 commits into
theopenco:mainfrom
AmineAce:feat/reasoning-google-vertex

Conversation

@AmineAce

@AmineAce AmineAce commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Declares reasoningEfforts for the Gemini 3.x mappings that were missing them, per #3028.

Changes

  • google-vertex: gemini-3.1-flash-lite, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.6-flash → ["minimal", "low", "medium", "high"]
  • google-ai-studio: gemini-3.1-flash-lite → ["minimal", "low", "medium", "high"] (its Vertex sibling declared the tiers but the AI Studio mapping did not, unlike the other three models which declare them on both providers)

Source: Google Cloud's Vertex Thinking docs — summary table lists exact supported thinking_level values per model, cross-checked against each model's individual Vertex docs page.

Note that the gateway does not forward thinking_level itself; for Google providers it translates each effort tier into a thinkingConfig.thinkingBudget value (prepare-request-body.ts). The declared tiers are what the catalogue publishes and what the e2e suite exercises.

Not changed — with reasons

  • Gemini 2.5-era and 1.5-era mappings — Vertex docs confirm no thinking_level mechanism exists for these generations (thinking_budget, a raw token count, is used instead — already declared via reasoningMaxTokens).
  • gemini-3-pro-preview, gemini-3.1-flash-lite-preview — retired/deactivated on Vertex.
  • gemini-3-flash-preview, gemini-3.1-pro-preview — the Vertex thinking table has rows for "Gemini 3 Flash"/"Gemini 3.1 Pro" without "preview" in the name; couldn't confirm these are the same model as our catalog's preview-suffixed entries (dedicated per-model doc pages both 404). Left unset rather than assume.
  • none — not declared anywhere here, matching the sibling mappings. It does return 200 on AI Studio with thinking disabled, but declaring it is out of scope for this change.

Testing

  • pnpm format, pnpm build — clean.
  • Scoped e2e against live Google endpoints (FULL_MODE=true, which expands one case per declared tier):
    • google-vertex × 4 models: 16/16 effort cases pass (minimal/low/medium/high).
    • google-ai-studio/gemini-3.1-flash-lite: 4/4 effort cases pass; full scoped run 113 passed / 0 failed.
  • Verified directly through the gateway that each tier reaches upstream and is differentiated rather than collapsed — reasoning-token counts scale with effort (e.g. gemini-3.1-flash-lite on Vertex: 140 → 152 → 243 → 271 for minimal → low → medium → high), matching Vertex's own thoughtsTokenCount in usageMetadata.

Summary by CodeRabbit

  • New Features
    • Added configurable reasoning effort levels—minimal, low, medium, and high—for supported Gemini models across Google AI Studio and Google Vertex AI.
    • Supported models include Gemini 3.1 Flash Lite, Gemini 3.5 Flash, Gemini 3.5 Flash Lite, and Gemini 3.6 Flash.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Five Google AI Studio and Google Vertex Gemini configurations now declare support for minimal, low, medium, and high reasoning effort levels.

Changes

Google Gemini reasoning effort support

Layer / File(s) Summary
Gemini reasoning effort declarations
packages/models/src/models/google.ts
Adds reasoningEfforts with minimal, low, medium, and high to five Gemini configurations across Google AI Studio and Google Vertex.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: declaring reasoning efforts for Gemini models.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

steebchen and others added 2 commits August 3, 2026 17:16
gemini-3.1-flash-lite declared reasoningEfforts on its google-vertex
mapping but not on google-ai-studio, unlike the other three Gemini
models in this change which declare the same tiers on both providers.

Verified live against AI Studio: minimal/low/medium/high all return 200
with reasoning output.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@steebchen steebchen changed the title feat(models): declare reasoning efforts for google-vertex feat(models): declare reasoning efforts for gemini Aug 3, 2026
@steebchen
steebchen enabled auto-merge August 3, 2026 16:55
@steebchen
steebchen added this pull request to the merge queue Aug 3, 2026
Merged via the queue into theopenco:main with commit d174600 Aug 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants