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
fix patch
Ishaan Jaffer859474dd44ac
diff --git a/tests/test_litellm/llms/bedrock/image/test_bedrock_image_prepare_request.py b/tests/test_litellm/llms/bedrock/image/test_bedrock_image_prepare_request.pyindex 6c56ccc1ef7..5d4fd45271c 100644--- a/tests/test_litellm/llms/bedrock/image/test_bedrock_image_prepare_request.py+++ b/tests/test_litellm/llms/bedrock/image/test_bedrock_image_prepare_request.py@@ -1,15 +1,17 @@-from unittest.mock import patch, MagicMock+from unittest.mock import MagicMock, patchfrom litellm.llms.bedrock.image_generation.image_handler import BedrockImageGeneration+def test_bedrock_image_prepare_request_with_arn() -> None:+ """Test that ARN model identifiers are correctly URL-encoded in the request endpoint."""dummy_arn = "arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abcdefghi123"image_generation = BedrockImageGeneration()with (- patch("litellm.llms.bedrock.image.image_handler.BedrockImageGeneration._get_boto_credentials_from_optional_params"),- patch("litellm.llms.bedrock.image.image_handler.BedrockImageGeneration.get_request_headers"),+ patch("litellm.llms.bedrock.image_generation.image_handler.BedrockImageGeneration._get_boto_credentials_from_optional_params"),+ patch("litellm.llms.bedrock.image_generation.image_handler.BedrockImageGeneration.get_request_headers"),):request = image_generation._prepare_request(model="amazon.nova-canvas-v1:0",@@ -27,11 +29,12 @@ def test_bedrock_image_prepare_request_with_arn() -> None:def test_bedrock_image_prepare_request_without_arn() -> None:+ """Test that regular model identifiers are used directly in the request endpoint."""image_generation = BedrockImageGeneration()with (- patch("litellm.llms.bedrock.image.image_handler.BedrockImageGeneration._get_boto_credentials_from_optional_params"),- patch("litellm.llms.bedrock.image.image_handler.BedrockImageGeneration.get_request_headers"),+ patch("litellm.llms.bedrock.image_generation.image_handler.BedrockImageGeneration._get_boto_credentials_from_optional_params"),+ patch("litellm.llms.bedrock.image_generation.image_handler.BedrockImageGeneration.get_request_headers"),):request = image_generation._prepare_request(model="amazon.nova-canvas-v1:0",