BerriAI/litellm · error · ValueError
Input type ' ' requires async_invoke route. Use model…
Error message
Input type '{input_type}' requires async_invoke route. Use model format: 'bedrock/async_invoke/model_id' What it means
Routing guard in the TwelveLabs Marengo embedding transformation: the requested input_type (video/audio/S3 media) is only supported through the async-invoke route, but the model string lacks the 'bedrock/async_invoke/' prefix. The model format is the input at fault.
Solutions
- Use the async_invoke model format: 'bedrock/async_invoke/<model_id>'.
- Change input_type to one supported by the synchronous route.
- Check the TwelveLabs Marengo docs for which input types require async invoke.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py:99 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/1d6f9eeee02989de.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py:99
"""
Transform OpenAI-style input to TwelveLabs Marengo format/async-invoke format.
Supports:
- Text inputs (for both invoke and async-invoke)
- Image inputs (for both invoke and async-invoke)
- Video inputs (async-invoke only)
- Audio inputs (async-invoke only)
- S3 URLs for all media types (async-invoke only)
"""
# Get input_type or default to "text"
input_type: Final = 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:
raise ValueError(
f"Input type '{input_type}' requires async_invoke route. "
f"Use model format: 'bedrock/async_invoke/model_id'"
)
transformed_request: Final[TwelveLabsMarengoEmbeddingRequest] = {"inputType": input_type}
if input_type == "text":
transformed_request["inputText"] = input
# Set default textTruncate if not specified
if "textTruncate" not in inference_params:
transformed_request["textTruncate"] = "end"
elif input_type in ["image", "video", "audio"]:
if self._is_s3_url(input):
# S3 URL input
s3_location: Final[TwelveLabsS3Location] = {"uri": input}
bucket_owner: Final = self._extract_bucket_owner_from_params(inference_params)
if bucket_owner:View on GitHub (pinned to 77b7c6c40c)