Merge pull request #41887 from BerriAI/litellm_gemma_4_26b_maas_context_window

fix: set vertex gemma-4-26b-a4b-it-maas context window to 262144
This commit is contained in:
Mateo Wang 2026-09-18 16:14:56 -07:00 committed by GitHub
commit ec05cd0128
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 3 deletions

View file

@ -50868,7 +50868,7 @@
"vertex_ai/google/gemma-4-26b-a4b-it-maas": {
"input_cost_per_token": 1.5e-07,
"litellm_provider": "vertex_ai-openai_models",
"max_input_tokens": 256000,
"max_input_tokens": 262144,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",

View file

@ -50868,7 +50868,7 @@
"vertex_ai/google/gemma-4-26b-a4b-it-maas": {
"input_cost_per_token": 1.5e-07,
"litellm_provider": "vertex_ai-openai_models",
"max_input_tokens": 256000,
"max_input_tokens": 262144,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",

View file

@ -30,7 +30,7 @@ from litellm.types.llms.vertex_ai import VertexPartnerProvider
_GEMMA_MODEL_COST_ENTRY = {
"vertex_ai/google/gemma-4-26b-a4b-it-maas": {
"litellm_provider": "vertex_ai-openai_models",
"max_input_tokens": 256000,
"max_input_tokens": 262144,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
@ -180,6 +180,15 @@ class TestCreateVertexURLGemma:
# ---------------------------------------------------------------------------
def test_gemma_maas_context_window_matches_google(local_model_cost_map):
info = litellm.get_model_info("vertex_ai/google/gemma-4-26b-a4b-it-maas")
# 262,144 context length and 128,000 maximum output per Google's model page, checked 2026-09-18:
# https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/maas/google/gemma-4-26b-a4b-it
assert info["max_input_tokens"] == 262144
assert info["max_output_tokens"] == 128000
# ---------------------------------------------------------------------------
# Integration tests: verify payloads reach the global OpenAI endpoint
#