Conversation
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
Greptile SummaryThis follow-up synchronizes Gemini 3.7 Flash region metadata into both model catalogs while preserving explicitly configured Vertex AI locations.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| litellm/llms/vertex_ai/vertex_llm_base.py | Region resolution now uses catalog metadata only for missing locations and preserves every explicit location. |
| model_prices_and_context_window.json | Adds Gemini 3.7 Flash region metadata to the root model registry. |
| litellm/model_prices_and_context_window_backup.json | Synchronizes the packaged runtime catalog with the root registry. |
| tests/test_litellm/llms/vertex_ai/test_vertex_ai_common_utils.py | Covers missing, supported, and explicitly configured region resolution for Gemini 3.7 Flash. |
| tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/gemma/test_vertex_ai_gemma_global_endpoint.py | Updates Gemma coverage to enforce preservation of explicit regions. |
| tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/qwen/test_vertex_ai_qwen_global_endpoint.py | Updates Qwen coverage to enforce preservation of explicit regions. |
Reviews (3): Last reviewed commit: "fix(model_cost): sync Gemini 3.7 regions..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Reviewed while consolidating registry changes into the rolling PR #37902. Not rolling this one in yet, reason in that PR description under 'Source PR disposition for this run'. Leaving it open for the author to respond. |
|
Updated the resolver and tests to preserve explicit regions, and confirmed Google lists only global, us, and eu. @devin-ai-integration @greptileai please review again |
|
Synced the packaged local model catalog with the root registry, fixing the CI failure while preserving explicit regions. @devin-ai-integration @greptileai please review again |
TLDR
Problem this solves:
us-central1when no location is suppliedHow it solves it:
global,us, andeuglobalUser Flow
Before: a proxy admin saves Gemini 3.7 Flash, but a deployment without a persisted location routes to unsupported
us-central1/ui/?page=models, addvertex_ai/gemini-3.7-flash, enter their Vertex project, set the location toglobal, and see the connection test succeedPOST /v1/chat/completionswith"model": "gemini-3.7-flash"locations/us-central1After: a missing saved location defaults to a supported endpoint without overriding an explicit regional setting
vertex_ai/gemini-3.7-flashglobalglobal,us,eu, or regional values remain unchangedRelevant issues
Fixes #37989
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review)
Screenshots / Proof of Fix
Before (75613bf)
git show 75613bf22f:model_prices_and_context_window.json | jq '."vertex_ai/gemini-3.7-flash".supported_regions // null'null, so LiteLLM has no model-specific location metadatalocations/us-central1in the Vertex AI publisher-model path, as reproduced in [Bug]: Vertex AI Gemini 3.7 Flash defaults to unsupported us-central1 location #37989After (e05d99d)
git show e05d99d345:model_prices_and_context_window.json | jq '."vertex_ai/gemini-3.7-flash".supported_regions // null'["global", "us", "eu"], matching the Gemini 3.7 Flash model pageglobal; explicit locations remain unchangedType
🐛 Bug Fix
✅ Test
Caveats (if any)
QA runbook
tests/test_litellm/llms/vertex_ai/test_vertex_ai_common_utils.py::test_get_vertex_region_gemini_3_7_flashverifies Gemini 3.7 Flash location selectionglobalglobal,us, andeuand expect each unchangedus-central1and expectus-central1unchangedFinal Attestation