Skip to content

fix(models): enable Priority on Gemini 3.7 Flash - #3594

Merged
steebchen merged 4 commits into
mainfrom
add-gemini-3-7-flash
Aug 13, 2026
Merged

steebchen merged 4 commits into
mainfrom
add-gemini-3-7-flash

Conversation

@steebchen

@steebchen steebchen commented Aug 13, 2026 •

Copy link
Copy Markdown
Member

This branch originally added Gemini 3.7 Flash, but #3592 landed the same model first. Merged main and dropped everything that duplicated it. What remains is a single correction to the merged entry.

The change

The google-ai-studio mapping for gemini-3.7-flash declares serviceTiers: ["flex"], with the comment "priority requests are silently downgraded to standard for this model on the Gemini Developer API". That is not what the API does — Priority is served, and declaring only flex means routing never offers Priority on the model at all.

-				// priority requests are silently downgraded to standard for this
-				// model on the Gemini Developer API, so only flex is declared
-				serviceTiers: ["flex"],
+				serviceTiers: ["flex", "priority"],

Everything else on the entry — the introductory pricing, reasoningEfforts, the Vertex mapping with Flex removed — is taken from main unchanged.

Evidence

Direct requests to the Gemini Developer API with the same top-level service_tier field the gateway sends, three runs of each tier:

requested served (usageMetadata.serviceTier)
priority priority (3/3)
flex flex (3/3)

The likely origin of the original finding: AI Studio reports the served tier in the response body, not in a response header, so a header-based check shows nothing and looks like a downgrade.

End-to-end through the gateway, from the log rows the e2e run wrote:

model requested used prompt tokens input_cost
google-ai-studio/gemini-3.7-flash priority priority 10 1.35e-05
google-ai-studio/gemini-3.7-flash flex flex 10 3.75e-06
google-vertex/gemini-3.7-flash priority priority 10 1.35e-05

The tier is resolved as served, not downgraded, and billing applies the provider's declared multipliers: 10 x 0.75e-6 x 1.8 = 1.35e-05 for Priority and 10 x 0.75e-6 x 0.5 = 3.75e-06 for Flex.

Verification

  • TEST_MODELS="google-ai-studio/gemini-3.7-flash,google-vertex/gemini-3.7-flash" FULL_MODE=true over the gateway e2e files: 29 files passed, 134 passed / 39 skipped, 0 failures, including both service tiers on each mapping.
  • pnpm exec vitest run packages/models — 138 passed.
  • pnpm format and pnpm build clean.

Also independently confirmed while working on this branch, and matching what main already has: Vertex rejects Flex for this model (400 INVALID_ARGUMENT: "Flex API is not supported for model: gemini-3.7-flash") while Priority succeeds, so the Vertex mapping is correct as merged.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Expanded Gemini 3.7 Flash availability through Google AI Studio to support both Flex and Priority service tiers.
    • Continued support for multimodal inputs, streaming, web search, caching, tool use, structured outputs, configurable reasoning levels, and usage configuration details.

Adds the google-ai-studio and google-vertex mappings for Gemini 3.7
Flash. Prices, context/output limits and every capability flag were
probed live against both deployments. The model drops the minimal
thinking level, so reasoningEfforts is low/medium/high.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 13, 2026 19:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 94b2547c-0009-4418-9560-4d23ba8caed6

📥 Commits

Reviewing files that changed from the base of the PR and between 987749d and 1afb6a4.

📒 Files selected for processing (1)
  • packages/models/src/models/google.ts

Walkthrough

The Google AI Studio configuration for gemini-3.7-flash now supports both flex and priority service tiers.

Changes

Gemini 3.7 Flash service tiers

Layer / File(s) Summary
AI Studio service tier configuration
packages/models/src/models/google.ts
Updates gemini-3.7-flash to declare flex and priority service tiers. Removes the flex-only downgrade comment.

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

Mergeability Score: ⚪ Minimal · up to 1afb6

This localized model-catalogue update adds the Gemini 3.7 Flash mappings and service-tier behavior; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: smakosh

🚥 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 and concisely describes the main change: enabling Priority service support for Gemini 3.7 Flash.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-gemini-3-7-flash

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 3 commits August 13, 2026 22:00
Vertex rejects Flex for gemini-3.7-flash ("Flex API is not supported for
model"), while Priority works and both tiers work on AI Studio. Declaring
it made the gateway route Flex requests into a hard 400.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Google charges half the declared rates through 2026-12-31; the catalogue
carries the post-promo rates, matching 3.6 Flash.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts:
#	packages/models/src/models/google.ts
@steebchen steebchen changed the title feat(models): add Gemini 3.7 Flash fix(models): enable Priority on Gemini 3.7 Flash Aug 13, 2026
@steebchen
steebchen enabled auto-merge (squash) August 13, 2026 21:41
@steebchen
steebchen merged commit 2c06543 into main Aug 13, 2026
13 checks passed
@steebchen
steebchen deleted the add-gemini-3-7-flash branch August 13, 2026 21:54
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