Skip to content

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]

fix linting error

Ishaan Jaffercdfb53dd816a
diff --git a/litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py b/litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py
index ecbe0278995..c85c388eebc 100644
--- a/litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py
+++ b/litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py
@@ -6,9 +6,10 @@ Why separate file? Make it easy to see how transformation works
Docs - https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-marengo.html
"""
-from typing import List, Optional, Union
+from typing import List, Optional, Union, cast
from litellm.types.llms.bedrock import (
+ TWELVELABS_EMBEDDING_INPUT_TYPES,
TwelveLabsAsyncInvokeRequest,
TwelveLabsMarengoEmbeddingRequest,
TwelveLabsOutputDataConfig,
@@ -90,7 +91,10 @@ class TwelveLabsMarengoEmbeddingConfig:
- S3 URLs for all media types (async-invoke only)
"""
# Get input_type or default to "text"
- input_type = inference_params.get("inputType") or inference_params.get("input_type") or "text"
+ input_type = cast(
+ TWELVELABS_EMBEDDING_INPUT_TYPES,
+ 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: