Repository navigation
fix(vertex_ai): correct gemma-4-26b-a4b-it-maas context window to 262144 - #31747
Closed
mateo-berri wants to merge 1 commit into
Closed
mateo-berri wants to merge 1 commit into
mateo-berri wants to merge 1 commit into
Conversation
Google's Vertex AI model card for gemma-4-26b-a4b-it-maas lists a 262,144 token context window, but the cost map carried a rounded 256000. Align max_input_tokens with the official spec and the full-context-window convention used by sibling Vertex MaaS entries, and add a regression test that loads the local cost map and guards the entry against the model card. Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
|
|
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
6 tasks done
Contributor
|
Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level |
devin-ai-integration
Bot
deleted the
litellm_gemma-4-26b-maas-context-window-6ea5
branch
September 10, 2026 03:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant issues
Linear ticket
Resolves LIT-4117
Pre-Submission checklist
@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewContext
The Vertex AI MaaS model
vertex_ai/google/gemma-4-26b-a4b-it-maasis already wired up and working: it lives in the cost map, routes through the OpenAI-compatible partner-models path via thegoogle/gemma-prefix, and is covered by tests. The one inaccuracy was its context windowThe cost map carried
max_input_tokens: 256000, a rounded approximation. Google's official Vertex AI model card lists the context length as 262,144 tokens (256K) with a 128,000 max output. Sibling Vertex MaaS entries such asvertex_ai/openai/gpt-oss-120b-maasalready setmax_input_tokensto the full context window, so this aligns gemma-4 with both the model card and the existing convention. The undercount silently truncated callers that gate onget_model_info, rejecting valid 256K-token promptsChanges
Set
max_input_tokensto262144forvertex_ai/google/gemma-4-26b-a4b-it-maasin bothmodel_prices_and_context_window.jsonand the packagedlitellm/model_prices_and_context_window_backup.json. Added a regression test that loads the local cost map and asserts the entry matches the model card (context window, max output, input/output cost, function-calling and vision flags), which fails on the old 256000 valueType
🐛 Bug Fix
Screenshots / Proof of Fix
No GCP credentials are available in this environment, so a live Gemma inference call against Vertex was not possible. Since this is a cost-map metadata correction, the end-user-visible surface is the model info the proxy reports. Ran a live proxy with the local cost map and queried it
Before the fix the same endpoint returned
"max_input_tokens": 256000Slack Thread