This commit is contained in:
xyos 2026-08-27 21:51:09 +08:00 committed by GitHub
commit e947a751e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 44 additions and 27 deletions

View file

@ -49862,9 +49862,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": [
@ -49881,9 +49881,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": [
@ -49900,9 +49900,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": [
@ -49921,9 +49921,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",

View file

@ -49862,9 +49862,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": [
@ -49881,9 +49881,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": [
@ -49900,9 +49900,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": [
@ -49921,9 +49921,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",

View file

@ -638,9 +638,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(
@ -682,3 +682,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