test bedrock embedding tests marengo

This commit is contained in:
Ishaan Jaffer
2025-10-04 11:27:29 -07:00
parent 44db58c8df
commit 7a41c09529
2 changed files with 5 additions and 5 deletions
@@ -89,10 +89,8 @@ class TwelveLabsMarengoEmbeddingConfig:
- Audio inputs (async-invoke only)
- S3 URLs for all media types (async-invoke only)
"""
if inference_params.get("inputType"):
input_type = inference_params["inputType"]
else:
raise ValueError("input_type is required")
# Get input_type or default to "text"
input_type = inference_params.get("inputType") or inference_params.get("input_type") or "text"
# Validate that async-invoke is used for video/audio
if input_type in ["video", "audio"] and not async_invoke_route:
@@ -136,6 +134,7 @@ class TwelveLabsMarengoEmbeddingConfig:
for k, v in inference_params.items():
if k not in [
"inputType",
"input_type", # Exclude both camelCase and snake_case
"inputText",
"mediaSource",
"bucketOwner", # Don't include bucketOwner in the request
@@ -140,7 +140,8 @@ def test_e2e_bedrock_embedding_image_twelvelabs_marengo():
response = litellm.embedding(
model="bedrock/us.twelvelabs.marengo-embed-2-7-v1:0",
input=[duck_img_base64],
aws_region_name="us-east-1"
aws_region_name="us-east-1",
input_type="image"
)
# Validate response structure