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
test(bedrock): point unit tests at model ids still in the cost map (#42606)
devin-ai-integration[bot]3c3803f37afa
diff --git a/tests/llm_translation/test_bedrock_dynamic_auth_params_unit_tests.py b/tests/llm_translation/test_bedrock_dynamic_auth_params_unit_tests.pyindex 2d1d2815026..184a0ae0749 100644--- a/tests/llm_translation/test_bedrock_dynamic_auth_params_unit_tests.py+++ b/tests/llm_translation/test_bedrock_dynamic_auth_params_unit_tests.py@@ -9,6 +9,7 @@ import litellmfrom litellm.llms.custom_httpx.http_handler import HTTPHandlerfrom unittest.mock import Mockfrom litellm.llms.bedrock.base_aws_llm import BaseAWSLLM+from litellm.llms.bedrock.common_utils import BedrockModelInfo@@ -42,7 +43,7 @@ def test_bedrock_completion_with_region_name():# Pass the client so that the HTTP call will be intercepted.response = litellm.completion(- model="cohere.command-r-v1:0",+ model="bedrock/cohere.command-r-v1:0",messages=[{"role": "user", "content": "Hello, world!"}],aws_region_name="us-west-12",client=client,@@ -98,7 +99,7 @@ def test_bedrock_completion_with_dynamic_authentication_params():# Pass the client so that the HTTP call will be intercepted.response = litellm.completion(- model="cohere.command-r-v1:0",+ model="bedrock/cohere.command-r-v1:0",messages=[{"role": "user", "content": "Hello, world!"}],aws_access_key_id="dynamically_generated_access_key_id",aws_secret_access_key="dynamically_generated_secret_access_key",@@ -146,7 +147,7 @@ def test_bedrock_completion_with_dynamic_bedrock_runtime_endpoint():# Pass the client so that the HTTP call will be intercepted.response = litellm.completion(- model="cohere.command-r-v1:0",+ model="bedrock/cohere.command-r-v1:0",messages=[{"role": "user", "content": "Hello, world!"}],aws_bedrock_runtime_endpoint="https://my-fake-endpoint.com",client=client,@@ -179,7 +180,7 @@ class DummyCredentials:"model",["bedrock/converse/cohere.command-r-v1:0",- "cohere.command-r-v1:0",+ "amazon.nova-2-lite-v1:0","bedrock/cohere.command-r-v1:0","bedrock/invoke/cohere.command-r-v1:0",],@@ -250,7 +251,7 @@ def test_dynamic_aws_params_propagation(model, param_name, param_value, expected"finish_reason": "COMPLETE",})- if "converse" in model:+ if BedrockModelInfo.get_bedrock_route(model) == "converse":mock_response.text = json.dumps({"output": {diff --git a/tests/local_testing/test_router.py b/tests/local_testing/test_router.pyindex bd0a9bf8df4..4c62c28530d 100644--- a/tests/local_testing/test_router.py+++ b/tests/local_testing/test_router.py@@ -1284,15 +1284,18 @@ def test_model_group_info():router = Router(model_list=[{- "model_name": "command-r-plus",- "litellm_params": {"model": "cohere.command-r-plus-v1:0"},+ "model_name": "nova-2-lite",+ "litellm_params": {"model": "bedrock/amazon.nova-2-lite-v1:0"},}])- response = router.get_model_group_info(model_group="command-r-plus")+ response = router.get_model_group_info(model_group="nova-2-lite")assert response is not None+ assert response.model_group == "nova-2-lite"+ assert response.providers == ["bedrock"]+ assert response.max_input_tokens is not Nonedef test_consistent_model_id():