From 75faed177862ff8162873d19ad5f92d802c12662 Mon Sep 17 00:00:00 2001 From: Marty Sullivan Date: Tue, 14 Jul 2026 19:38:13 -0400 Subject: [PATCH] fix(bedrock_mantle): route xai.grok-4.3 via /openai/v1 frontier path (#33027) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit grok-4.3 is a third-party frontier model on Bedrock Mantle, served on the /openai/v1 base (like gpt-5.x and gemma-4), not the standard /v1 path used by open-weights models such as gpt-oss. #31916 added the model without use_openai_responses_path, so mantle_base_segment() routed it to /v1, where Bedrock rejects the call with "Berm is not enabled for this account" (access_denied) — the model is only reachable on the frontier /openai/v1 path. Add use_openai_responses_path=true to the bedrock_mantle/xai.grok-4.3 price-map entry (both model_prices_and_context_window.json and the backup) so mantle_base_segment() returns "openai/v1", and update the registry test to assert use_openai_path is True. --- litellm/model_prices_and_context_window_backup.json | 1 + model_prices_and_context_window.json | 1 + .../test_bedrock_mantle_responses_transformation.py | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index a111f301d11..7369d9c9dcd 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -43574,6 +43574,7 @@ "supports_vision": true }, "bedrock_mantle/xai.grok-4.3": { + "use_openai_responses_path": true, "input_cost_per_token": 1.25e-06, "output_cost_per_token": 2.5e-06, "cache_read_input_token_cost": 2e-07, diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index d6e4a265da0..b99f7228aab 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -43806,6 +43806,7 @@ "supports_vision": true }, "bedrock_mantle/xai.grok-4.3": { + "use_openai_responses_path": true, "input_cost_per_token": 1.25e-06, "output_cost_per_token": 2.5e-06, "cache_read_input_token_cost": 2e-07, diff --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.py index aafaf401700..903d1e577a6 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 @@ -460,7 +460,12 @@ class TestBedrockMantleResponsesRegistry: model="xai.grok-4.3", ) assert isinstance(cfg, BedrockMantleResponsesAPIConfig) - assert cfg.use_openai_path is False + # grok-4.3 is a third-party frontier model on Bedrock Mantle, served on the + # /openai/v1 base (like gpt-5.x / gemma-4), not the standard /v1 path used by + # open-weights models such as gpt-oss. The standard /v1 base returns + # "Berm is not enabled for this account", so the price-map entry carries + # use_openai_responses_path=true. + assert cfg.use_openai_path is True def test_unmapped_frontier_model_falls_through_to_none(self, restore_model_cost): # The gate is data-driven, not name-based: an unseen model not yet in the