The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(model_prices): raise bedrock_mantle gpt-5.6 max_input_tokens to Mantle's enforced 1050000
mateo-berrif583151a5b89
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 9f953e11df1..1aa4c7cd060 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -49016,12 +49016,13 @@"output_cost_per_token": 3.3e-05,"output_cost_per_token_above_272k_tokens": 4.95e-05,"litellm_provider": "bedrock_mantle",- "max_input_tokens": 1000000,+ "max_input_tokens": 1050000,"max_output_tokens": 128000,"max_tokens": 128000,"mode": "responses","use_openai_responses_path": true,"supported_endpoints": [+ "/v1/chat/completions","/v1/responses"],"supported_modalities": [@@ -49048,12 +49049,13 @@"output_cost_per_token": 1.32e-05,"output_cost_per_token_above_272k_tokens": 1.98e-05,"litellm_provider": "bedrock_mantle",- "max_input_tokens": 1000000,+ "max_input_tokens": 1050000,"max_output_tokens": 128000,"max_tokens": 128000,"mode": "responses","use_openai_responses_path": true,"supported_endpoints": [+ "/v1/chat/completions","/v1/responses"],"supported_modalities": [@@ -49080,12 +49082,13 @@"output_cost_per_token": 1.32e-06,"output_cost_per_token_above_272k_tokens": 1.98e-06,"litellm_provider": "bedrock_mantle",- "max_input_tokens": 1000000,+ "max_input_tokens": 1050000,"max_output_tokens": 128000,"max_tokens": 128000,"mode": "responses","use_openai_responses_path": true,"supported_endpoints": [+ "/v1/chat/completions","/v1/responses"],"supported_modalities": [diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 9f953e11df1..1aa4c7cd060 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -49016,12 +49016,13 @@"output_cost_per_token": 3.3e-05,"output_cost_per_token_above_272k_tokens": 4.95e-05,"litellm_provider": "bedrock_mantle",- "max_input_tokens": 1000000,+ "max_input_tokens": 1050000,"max_output_tokens": 128000,"max_tokens": 128000,"mode": "responses","use_openai_responses_path": true,"supported_endpoints": [+ "/v1/chat/completions","/v1/responses"],"supported_modalities": [@@ -49048,12 +49049,13 @@"output_cost_per_token": 1.32e-05,"output_cost_per_token_above_272k_tokens": 1.98e-05,"litellm_provider": "bedrock_mantle",- "max_input_tokens": 1000000,+ "max_input_tokens": 1050000,"max_output_tokens": 128000,"max_tokens": 128000,"mode": "responses","use_openai_responses_path": true,"supported_endpoints": [+ "/v1/chat/completions","/v1/responses"],"supported_modalities": [@@ -49080,12 +49082,13 @@"output_cost_per_token": 1.32e-06,"output_cost_per_token_above_272k_tokens": 1.98e-06,"litellm_provider": "bedrock_mantle",- "max_input_tokens": 1000000,+ "max_input_tokens": 1050000,"max_output_tokens": 128000,"max_tokens": 128000,"mode": "responses","use_openai_responses_path": true,"supported_endpoints": [+ "/v1/chat/completions","/v1/responses"],"supported_modalities": [diff --git a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.pyindex c8c36032793..6f513ce1bd4 100644--- a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py+++ b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py@@ -478,10 +478,10 @@ def test_generic_cost_per_token_minimax_m3_above_512k_tokens(_local_model_cost_m],)def test_generic_cost_per_token_bedrock_mantle_gpt56_long_context(_local_model_cost_map, model):- """Bedrock GPT-5.6 supports a 1M context window, billed at the long-context rates above 272K."""+ """Bedrock GPT-5.6 enforces a 1,050,000-token context window, billed at the long-context rates above 272K."""model_cost_map = litellm.model_cost[model]- assert model_cost_map["max_input_tokens"] == 1000000+ assert model_cost_map["max_input_tokens"] == 1050000cached_tokens = 100000completion_tokens = 1000diff --git a/tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_responses_transformation.py b/tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_responses_transformation.pyindex 9e05d48a18f..fd279a2bc1f 100644--- a/tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_responses_transformation.py+++ b/tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_responses_transformation.py@@ -8,7 +8,8 @@ gate, the URL construction for both paths, and the shared Bearer auth."""import copy-+import json+from pathlib import Pathimport pytestfrom botocore.exceptions import (@@ -1523,7 +1524,7 @@ class TestBedrockMantleResponsesPricing:assert info["cache_creation_input_token_cost"] == pytest.approx(cache_creation_cost)assert info["cache_read_input_token_cost"] == pytest.approx(cache_read_cost)assert info["output_cost_per_token"] == pytest.approx(output_cost)- assert info["max_input_tokens"] == 1000000+ assert info["max_input_tokens"] == 1050000assert info["input_cost_per_token_above_272k_tokens"] == pytest.approx(input_cost * 2)assert info["cache_creation_input_token_cost_above_272k_tokens"] == pytest.approx(cache_creation_cost * 2)assert info["cache_read_input_token_cost_above_272k_tokens"] == pytest.approx(cache_read_cost * 2)@@ -1565,3 +1566,42 @@ class TestBedrockMantleResponsesPricing:def test_models_registered(self, local_cost_map):assert "bedrock_mantle/openai.gpt-5.5" in litellm.bedrock_mantle_modelsassert "bedrock_mantle/openai.gpt-5.4" in litellm.bedrock_mantle_models+++def _repo_cost_map(map_name: str) -> dict:+ repo_root = Path(__file__).resolve().parents[4]+ paths = {+ "root": repo_root / "model_prices_and_context_window.json",+ "bundled_backup": repo_root / "litellm" / "model_prices_and_context_window_backup.json",+ }+ return json.loads(paths[map_name].read_text())+++class TestGpt56MantleRegistryEntries:+ """Locks the gpt-5.6 frontier entries to Bedrock Mantle's live behavior.++ Mantle enforces a 1,050,000-token prompt maximum for gpt-5.6 sol/terra/luna+ (oversize requests 400 with "prompt tokens (N) exceed model maximum+ (1050000)", and a 1,030,590-token request completes), matching the OpenAI+ Bedrock guide. mode must stay "responses": Mantle's native+ /v1/chat/completions rejects function tools unless reasoning_effort is+ "none", so chat traffic has to keep bridging to the Responses API+ (see the responses_api_bridge tests above).+ """++ @pytest.mark.parametrize("map_name", ("root", "bundled_backup"))+ @pytest.mark.parametrize(+ "key",+ (+ "bedrock_mantle/openai.gpt-5.6-sol",+ "bedrock_mantle/openai.gpt-5.6-terra",+ "bedrock_mantle/openai.gpt-5.6-luna",+ ),+ )+ def test_entry_matches_mantle_enforced_limits(self, map_name, key):+ entry = _repo_cost_map(map_name)[key]+ assert entry["max_input_tokens"] == 1050000+ assert entry["max_output_tokens"] == 128000+ assert entry["mode"] == "responses"+ assert entry["use_openai_responses_path"] is True+ assert entry["supported_endpoints"] == ["/v1/chat/completions", "/v1/responses"]