fix(sambanova): update pricing, deprecate retired models, and add missing models (#30016)

* feat(bedrock): add amazon.titan-embed-g1-text-02 embedding model support

- Add model to provider routing allowlist in embedding.py
- Add request transformation using AmazonTitanG1Config
- Add response transformation using AmazonTitanG1Config
- Add pricing metadata to model_prices_and_context_window.json
- Add unit tests for embedding and model info

Fixes missing cost tracking reported in #29786
Related to VANDRANKI/litellm PR #29790

* style: fix syntax error, trailing whitespace and missing newline

* style: apply black formatting to embedding.py

* style: apply black formatting to test_bedrock_embedding.py

* fix(sambanova): update pricing, fix context windows, add deprecation dates, and add missing models

* fix(sambanova): sync model_prices_and_context_window_backup.json with primary

* fix(sambanova): fix indentation on Meta-Llama-3.2-1B-Instruct deprecation_date

* fix(bedrock): add amazon.titan-embed-g1-text-02 to unmapped model error message

* style: apply black formatting to embedding.py

* fix(sambanova): correct indentation on DeepSeek-V3.2 entry

* fix(sambanova): replace gemma-3-12b-it with gemma-4-31B-it (verified pricing)
This commit is contained in:
bhumikadangayach 2026-06-24 16:57:41 +05:30 • committed by GitHub
parent 2f6fd18842
commit af7b0af52f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 819 additions and 250 deletions

View file

@ -224,6 +224,10 @@ class BedrockEmbedding(BaseAWSLLM):
returned_response = AmazonTitanV2Config()._transform_response(
response_list=response_list, model=model
)
elif model == "amazon.titan-embed-g1-text-02":
returned_response = AmazonTitanG1Config()._transform_response(
response_list=response_list, model=model
)
elif provider == "twelvelabs":
returned_response = (
TwelveLabsMarengoEmbeddingConfig()._transform_response(
@ -447,6 +451,7 @@ class BedrockEmbedding(BaseAWSLLM):
"amazon.titan-embed-image-v1",
"amazon.titan-embed-text-v1",
"amazon.titan-embed-text-v2:0",
"amazon.titan-embed-g1-text-02",
]:
batch_data = []
for i in input:
@ -464,6 +469,10 @@ class BedrockEmbedding(BaseAWSLLM):
transformed_request = AmazonTitanV2Config()._transform_request(
input=i, inference_params=inference_params
)
elif model == "amazon.titan-embed-g1-text-02":
transformed_request = AmazonTitanG1Config()._transform_request(
input=i, inference_params=inference_params
)
else:
raise Exception(
"Unmapped model. Received={}. Expected={}".format(
@ -472,6 +481,7 @@ class BedrockEmbedding(BaseAWSLLM):
"amazon.titan-embed-image-v1",
"amazon.titan-embed-text-v1",
"amazon.titan-embed-text-v2:0",
"amazon.titan-embed-g1-text-02",
],
)
)

File diff suppressed because it is too large Load diff

View file

@ -570,6 +570,15 @@
"output_cost_per_token": 0.0,
"output_vector_size": 1536
},
"amazon.titan-embed-g1-text-02": {
"input_cost_per_token": 1e-07,
"litellm_provider": "bedrock",
"max_input_tokens": 8192,
"max_tokens": 8192,
"mode": "embedding",
"output_cost_per_token": 0.0,
"output_vector_size": 1536
},
"amazon.titan-embed-text-v2:0": {
"input_cost_per_token": 2e-08,
"litellm_provider": "bedrock",
@ -31381,13 +31390,13 @@
"output_cost_per_token": 0.0
},
"sambanova/MiniMax-M2.7": {
"input_cost_per_token": 3e-07,
"input_cost_per_token": 6e-07,
"litellm_provider": "sambanova",
"max_input_tokens": 204800,
"max_input_tokens": 196608,
"max_output_tokens": 131072,
"max_tokens": 131072,
"mode": "chat",
"output_cost_per_token": 1.2e-06,
"output_cost_per_token": 2.4e-06,
"source": "https://cloud.sambanova.ai/plans/pricing",
"supports_function_calling": true,
"supports_reasoning": true,
@ -31404,6 +31413,7 @@
"source": "https://cloud.sambanova.ai/plans/pricing"
},
"sambanova/DeepSeek-R1-Distill-Llama-70B": {
"deprecation_date": "2026-03-20",
"input_cost_per_token": 7e-07,
"litellm_provider": "sambanova",
"max_input_tokens": 131072,
@ -31414,6 +31424,7 @@
"source": "https://cloud.sambanova.ai/plans/pricing"
},
"sambanova/DeepSeek-V3-0324": {
"deprecation_date": "2026-04-14",
"input_cost_per_token": 3e-06,
"litellm_provider": "sambanova",
"max_input_tokens": 32768,
@ -31444,6 +31455,7 @@
"supports_vision": true
},
"sambanova/Llama-4-Scout-17B-16E-Instruct": {
"deprecation_date": "2025-06-19",
"input_cost_per_token": 4e-07,
"litellm_provider": "sambanova",
"max_input_tokens": 8192,
@ -31460,6 +31472,7 @@
"supports_tool_choice": true
},
"sambanova/Meta-Llama-3.1-405B-Instruct": {
"deprecation_date": "2025-06-25",
"input_cost_per_token": 5e-06,
"litellm_provider": "sambanova",
"max_input_tokens": 16384,
@ -31473,6 +31486,7 @@
"supports_tool_choice": true
},
"sambanova/Meta-Llama-3.1-8B-Instruct": {
"deprecation_date": "2026-04-14",
"input_cost_per_token": 1e-07,
"litellm_provider": "sambanova",
"max_input_tokens": 16384,
@ -31486,6 +31500,7 @@
"supports_tool_choice": true
},
"sambanova/Meta-Llama-3.2-1B-Instruct": {
"deprecation_date": "2025-06-25",
"input_cost_per_token": 4e-08,
"litellm_provider": "sambanova",
"max_input_tokens": 16384,
@ -31496,6 +31511,7 @@
"source": "https://cloud.sambanova.ai/plans/pricing"
},
"sambanova/Meta-Llama-3.2-3B-Instruct": {
"deprecation_date": "2025-06-25",
"input_cost_per_token": 8e-08,
"litellm_provider": "sambanova",
"max_input_tokens": 4096,
@ -31519,6 +31535,7 @@
"supports_tool_choice": true
},
"sambanova/Meta-Llama-Guard-3-8B": {
"deprecation_date": "2025-06-25",
"input_cost_per_token": 3e-07,
"litellm_provider": "sambanova",
"max_input_tokens": 16384,
@ -31529,6 +31546,7 @@
"source": "https://cloud.sambanova.ai/plans/pricing"
},
"sambanova/QwQ-32B": {
"deprecation_date": "2025-06-25",
"input_cost_per_token": 5e-07,
"litellm_provider": "sambanova",
"max_input_tokens": 16384,
@ -31539,6 +31557,7 @@
"source": "https://cloud.sambanova.ai/plans/pricing"
},
"sambanova/Qwen2-Audio-7B-Instruct": {
"deprecation_date": "2025-06-19",
"input_cost_per_token": 5e-07,
"litellm_provider": "sambanova",
"max_input_tokens": 4096,
@ -31550,6 +31569,7 @@
"supports_audio_input": true
},
"sambanova/Qwen3-32B": {
"deprecation_date": "2026-04-06",
"input_cost_per_token": 4e-07,
"litellm_provider": "sambanova",
"max_input_tokens": 8192,
@ -31563,9 +31583,9 @@
"supports_tool_choice": true
},
"sambanova/DeepSeek-V3.1": {
"max_tokens": 32768,
"max_input_tokens": 32768,
"max_output_tokens": 32768,
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
"input_cost_per_token": 3e-06,
"output_cost_per_token": 4.5e-06,
"litellm_provider": "sambanova",
@ -31579,13 +31599,36 @@
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
"input_cost_per_token": 2.2e-07,
"output_cost_per_token": 5.9e-07,
"litellm_provider": "sambanova",
"mode": "chat",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"source": "https://cloud.sambanova.ai/plans/pricing"
},
"sambanova/DeepSeek-V3.2": {
"max_tokens": 32768,
"max_input_tokens": 32768,
"max_output_tokens": 32768,
"input_cost_per_token": 3e-06,
"output_cost_per_token": 4.5e-06,
"litellm_provider": "sambanova",
"mode": "chat",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"source": "https://cloud.sambanova.ai/plans/pricing"
},
"sambanova/gemma-4-31B-it": {
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
"input_cost_per_token": 3.8e-07,
"output_cost_per_token": 1.15e-06,
"litellm_provider": "sambanova",
"mode": "chat",
"supports_vision": true,
"source": "https://cloud.sambanova.ai/plans/pricing"
},
"snowflake/claude-3-5-sonnet": {

View file

@ -34,6 +34,11 @@ img_base_64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIh
"text",
titan_embedding_response,
), # V2 text model
(
"bedrock/amazon.titan-embed-g1-text-02",
"text",
titan_embedding_response,
), # G1 text model
(
"bedrock/amazon.titan-embed-image-v1",
"image",
@ -459,3 +464,13 @@ def test_bedrock_embedding_region_bug_reproduction():
os.environ["AWS_REGION_NAME"] = original_region_name
else:
os.environ.pop("AWS_REGION_NAME", None)
def test_bedrock_titan_g1_text_02_model_info():
"""Test that amazon.titan-embed-g1-text-02 has correct pricing metadata"""
model_info = litellm.get_model_info("amazon.titan-embed-g1-text-02")
assert model_info is not None, "Model info should not be None"
assert model_info["litellm_provider"] == "bedrock"
assert model_info["mode"] == "embedding"
assert model_info["input_cost_per_token"] == 1e-07
assert model_info["max_input_tokens"] == 8192