Repository navigation
fix(models): enable Priority on Gemini 3.7 Flash - #3594
Conversation
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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe Google AI Studio configuration for ChangesGemini 3.7 Flash service tiers
Estimated code review effort: 1 (Trivial) | ~3 minutes Mergeability Score: ⚪ Minimal · up to 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: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
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
This branch originally added Gemini 3.7 Flash, but #3592 landed the same model first. Merged
mainand dropped everything that duplicated it. What remains is a single correction to the merged entry.The change
The
google-ai-studiomapping forgemini-3.7-flashdeclaresserviceTiers: ["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 onlyflexmeans routing never offers Priority on the model at all.Everything else on the entry — the introductory pricing,
reasoningEfforts, the Vertex mapping with Flex removed — is taken frommainunchanged.Evidence
Direct requests to the Gemini Developer API with the same top-level
service_tierfield the gateway sends, three runs of each tier:usageMetadata.serviceTier)prioritypriority(3/3)flexflex(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
logrows the e2e run wrote: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=trueover 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 formatandpnpm buildclean.Also independently confirmed while working on this branch, and matching what
mainalready 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