Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions litellm/model_prices_and_context_window_backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -42795,6 +42795,26 @@
"supports_tool_choice": true,
"supports_vision": true
},
"bedrock_mantle/xai.grok-4.3": {
"input_cost_per_token": 1.25e-06,
"output_cost_per_token": 2.5e-06,
"litellm_provider": "bedrock_mantle",
"max_input_tokens": 1000000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
"use_openai_responses_path": true,
"supported_endpoints": ["/v1/chat/completions", "/v1/responses"],
"supported_modalities": ["text", "image"],
"supported_output_modalities": ["text"],
"supports_function_calling": true,
"supports_none_reasoning_effort": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"source": "https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-xai-grok-4-3.html"
},
"volcengine/doubao-seed-2-0-pro-260215": {
"litellm_provider": "volcengine",
"max_input_tokens": 256000,
Expand Down
20 changes: 20 additions & 0 deletions model_prices_and_context_window.json
Original file line number Diff line number Diff line change
Expand Up @@ -43197,6 +43197,26 @@
"supports_tool_choice": true,
"supports_vision": true
},
"bedrock_mantle/xai.grok-4.3": {
"input_cost_per_token": 1.25e-06,
"output_cost_per_token": 2.5e-06,
"litellm_provider": "bedrock_mantle",
"max_input_tokens": 1000000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
"use_openai_responses_path": true,
"supported_endpoints": ["/v1/chat/completions", "/v1/responses"],
"supported_modalities": ["text", "image"],
"supported_output_modalities": ["text"],
"supports_function_calling": true,
"supports_none_reasoning_effort": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"source": "https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-xai-grok-4-3.html"
},
"volcengine/doubao-seed-2-0-pro-260215": {
"litellm_provider": "volcengine",
"max_input_tokens": 256000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,20 @@ class TestMantleSupportsResponses:
{"bedrock_mantle/google.gemma-3-27b-it": {"mode": "chat"}},
False,
),
# grok-4.3 on mantle openai/v1 responses path
(
"xai.grok-4.3",
{
"bedrock_mantle/xai.grok-4.3": {
"mode": "chat",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/responses",
],
}
},
True,
),
# absent from model_cost -> no signal -> not supported
("somelab.unmapped", {}, False),
(None, {}, False),
Expand Down Expand Up @@ -759,6 +773,10 @@ def test_gemma_4_uses_openai_responses_path(self, local_cost_map, model):
url = self._url_for(model)
assert url == "https://bedrock-mantle.us-east-2.api.aws/openai/v1/responses"

def test_grok_4_3_uses_openai_responses_path(self, local_cost_map):
url = self._url_for("xai.grok-4.3")
assert url == "https://bedrock-mantle.us-east-2.api.aws/openai/v1/responses"


class TestBedrockMantleEndpointHonoring:
def test_plain_chat_call_to_gpt_oss_is_not_bridged(self, local_cost_map):
Expand Down Expand Up @@ -1230,3 +1248,15 @@ def test_gpt_5_4_pricing_and_mode(self, local_cost_map):
def test_models_registered(self, local_cost_map):
assert "bedrock_mantle/openai.gpt-5.5" in litellm.bedrock_mantle_models
assert "bedrock_mantle/openai.gpt-5.4" in litellm.bedrock_mantle_models
assert "bedrock_mantle/xai.grok-4.3" in litellm.bedrock_mantle_models

def test_grok_4_3_pricing_and_capabilities(self, local_cost_map):
info = litellm.get_model_info("bedrock_mantle/xai.grok-4.3")
assert info["mode"] == "chat"
assert info["input_cost_per_token"] == pytest.approx(1.25e-06)
assert info["output_cost_per_token"] == pytest.approx(2.5e-06)
assert info["max_input_tokens"] == 1000000
assert info["supports_none_reasoning_effort"] is True
from litellm.llms.bedrock_mantle.common_utils import mantle_base_segment

assert mantle_base_segment("xai.grok-4.3", litellm.model_cost) == "openai/v1"