diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index d954e33da9c..e108b7d853d 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -45394,9 +45394,9 @@ "input_cost_per_token": 1.4e-07, "output_cost_per_token": 4e-07, "litellm_provider": "bedrock_mantle", - "max_input_tokens": 256000, - "max_output_tokens": 256000, - "max_tokens": 256000, + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "max_tokens": 262144, "mode": "chat", "use_openai_responses_path": true, "supported_endpoints": [ @@ -45413,9 +45413,9 @@ "input_cost_per_token": 1.3e-07, "output_cost_per_token": 4e-07, "litellm_provider": "bedrock_mantle", - "max_input_tokens": 256000, - "max_output_tokens": 256000, - "max_tokens": 256000, + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "max_tokens": 262144, "mode": "chat", "use_openai_responses_path": true, "supported_endpoints": [ @@ -45432,9 +45432,9 @@ "input_cost_per_token": 4e-08, "output_cost_per_token": 8e-08, "litellm_provider": "bedrock_mantle", - "max_input_tokens": 128000, - "max_output_tokens": 128000, - "max_tokens": 128000, + "max_input_tokens": 131072, + "max_output_tokens": 131072, + "max_tokens": 131072, "mode": "chat", "use_openai_responses_path": true, "supported_endpoints": [ @@ -45453,9 +45453,9 @@ "output_cost_per_token": 2.5e-06, "cache_read_input_token_cost": 2e-07, "litellm_provider": "bedrock_mantle", - "max_input_tokens": 131072, - "max_output_tokens": 16384, - "max_tokens": 16384, + "max_input_tokens": 1048576, + "max_output_tokens": 1048576, + "max_tokens": 1048576, "mode": "chat", "supported_endpoints": [ "/v1/chat/completions", diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 8982b4f2565..bcb60ad471f 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -45515,9 +45515,9 @@ "input_cost_per_token": 1.4e-07, "output_cost_per_token": 4e-07, "litellm_provider": "bedrock_mantle", - "max_input_tokens": 256000, - "max_output_tokens": 256000, - "max_tokens": 256000, + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "max_tokens": 262144, "mode": "chat", "use_openai_responses_path": true, "supported_endpoints": [ @@ -45534,9 +45534,9 @@ "input_cost_per_token": 1.3e-07, "output_cost_per_token": 4e-07, "litellm_provider": "bedrock_mantle", - "max_input_tokens": 256000, - "max_output_tokens": 256000, - "max_tokens": 256000, + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "max_tokens": 262144, "mode": "chat", "use_openai_responses_path": true, "supported_endpoints": [ @@ -45553,9 +45553,9 @@ "input_cost_per_token": 4e-08, "output_cost_per_token": 8e-08, "litellm_provider": "bedrock_mantle", - "max_input_tokens": 128000, - "max_output_tokens": 128000, - "max_tokens": 128000, + "max_input_tokens": 131072, + "max_output_tokens": 131072, + "max_tokens": 131072, "mode": "chat", "use_openai_responses_path": true, "supported_endpoints": [ @@ -45574,9 +45574,9 @@ "output_cost_per_token": 2.5e-06, "cache_read_input_token_cost": 2e-07, "litellm_provider": "bedrock_mantle", - "max_input_tokens": 131072, - "max_output_tokens": 16384, - "max_tokens": 16384, + "max_input_tokens": 1048576, + "max_output_tokens": 1048576, + "max_tokens": 1048576, "mode": "chat", "supported_endpoints": [ "/v1/chat/completions", diff --git a/tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_transformation.py b/tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_transformation.py index 275fb460b9f..480492dda26 100644 --- a/tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_transformation.py +++ b/tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_transformation.py @@ -641,9 +641,9 @@ class TestBedrockMantlePricing: @pytest.mark.parametrize( "model_id,input_cost,output_cost,max_tokens", [ - ("google.gemma-4-31b", 1.4e-07, 4e-07, 256000), - ("google.gemma-4-26b-a4b", 1.3e-07, 4e-07, 256000), - ("google.gemma-4-e2b", 4e-08, 8e-08, 128000), + ("google.gemma-4-31b", 1.4e-07, 4e-07, 262144), + ("google.gemma-4-26b-a4b", 1.3e-07, 4e-07, 262144), + ("google.gemma-4-e2b", 4e-08, 8e-08, 131072), ], ) def test_gemma_4_bedrock_mantle_model_metadata( @@ -685,3 +685,20 @@ def test_gemma_4_models_register_under_bedrock_mantle(local_cost_map, model_id): resolved_model, provider, _, _ = litellm.get_llm_provider(full_model_name) assert provider == "bedrock_mantle" assert resolved_model == model_id + + +@pytest.mark.parametrize( + "model_id, expected_tokens", + [ + ("xai.grok-4.3", 1048576), + ("google.gemma-4-31b", 262144), + ("google.gemma-4-26b-a4b", 262144), + ("google.gemma-4-e2b", 131072), + ], +) +def test_context_windows_match_bedrock_limits( + local_cost_map, model_id, expected_tokens +): + info = litellm.get_model_info(model=model_id, custom_llm_provider="bedrock_mantle") + assert info["max_input_tokens"] == expected_tokens + assert info["max_output_tokens"] == expected_tokens