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_e2e_bedrock_embedding_image_twelvelabs_marengodocs fix
Ishaan Jaffer39cf690d50d2
diff --git a/tests/llm_translation/test_bedrock_embedding.py b/tests/llm_translation/test_bedrock_embedding.pyindex af3e2fea14d..4adb38e8671 100644--- a/tests/llm_translation/test_bedrock_embedding.py+++ b/tests/llm_translation/test_bedrock_embedding.py@@ -78,13 +78,15 @@ def test_bedrock_embedding_models(model, input_type, embed_response):pytest.fail(f"Error occurred: {e}")[email protected](os.environ, {}, clear=True)def test_e2e_bedrock_embedding():"""Test text embedding with TwelveLabs Marengo.Validates that the transformation properly extracts embedding data from TwelveLabs response format."""print("Testing text embedding...")+ original_region_name = os.environ.get("AWS_REGION_NAME")+ os.environ.pop("AWS_REGION_NAME")+litellm._turn_on_debug()response = litellm.embedding(model="bedrock/us.twelvelabs.marengo-embed-2-7-v1:0",@@ -115,15 +117,18 @@ def test_e2e_bedrock_embedding():print(f"Text embedding successful! Vector size: {len(embedding_obj.embedding)}, Response: {response}")+ # Restore original region name+ if original_region_name:+ os.environ["AWS_REGION_NAME"] = original_region_name-[email protected](os.environ, {}, clear=True)def test_e2e_bedrock_embedding_image_twelvelabs_marengo():"""Test image embedding with TwelveLabs Marengo.Validates that the transformation properly extracts embedding data from TwelveLabs response format for images."""print("Testing image embedding...")+ original_region_name = os.environ.get("AWS_REGION_NAME")+ os.environ.pop("AWS_REGION_NAME")litellm._turn_on_debug()# Load duck.png and convert to base64@@ -165,3 +170,6 @@ def test_e2e_bedrock_embedding_image_twelvelabs_marengo():print(f"Image embedding successful! Vector size: {len(embedding_obj.embedding)}, Response: {response}")+ # Restore original region name+ if original_region_name:+ os.environ["AWS_REGION_NAME"] = original_region_name\ No newline at end of file