{"record":{"id":"1d6f9eeee02989de","repo":"BerriAI/litellm","slug":"input-type-input-type-requires-async-invoke-ro","errorCode":null,"errorMessage":"Input type '{input_type}' requires async_invoke route. Use model format: 'bedrock/async_invoke/model_id'","messagePattern":"Input type '(.+?)' requires async_invoke route\\. Use model format: 'bedrock/async_invoke/model_id'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py","lineNumber":99,"sourceCode":"        \"\"\"\n        Transform OpenAI-style input to TwelveLabs Marengo format/async-invoke format.\n\n        Supports:\n        - Text inputs (for both invoke and async-invoke)\n        - Image inputs (for both invoke and async-invoke)\n        - Video inputs (async-invoke only)\n        - Audio inputs (async-invoke only)\n        - S3 URLs for all media types (async-invoke only)\n        \"\"\"\n        # Get input_type or default to \"text\"\n        input_type: Final = cast(\n            TWELVELABS_EMBEDDING_INPUT_TYPES,\n            inference_params.get(\"inputType\") or inference_params.get(\"input_type\") or \"text\",\n        )\n\n        # Validate that async-invoke is used for video/audio\n        if input_type in [\"video\", \"audio\"] and not async_invoke_route:\n            raise ValueError(\n                f\"Input type '{input_type}' requires async_invoke route. \"\n                f\"Use model format: 'bedrock/async_invoke/model_id'\"\n            )\n\n        transformed_request: Final[TwelveLabsMarengoEmbeddingRequest] = {\"inputType\": input_type}\n\n        if input_type == \"text\":\n            transformed_request[\"inputText\"] = input\n            # Set default textTruncate if not specified\n            if \"textTruncate\" not in inference_params:\n                transformed_request[\"textTruncate\"] = \"end\"\n\n        elif input_type in [\"image\", \"video\", \"audio\"]:\n            if self._is_s3_url(input):\n                # S3 URL input\n                s3_location: Final[TwelveLabsS3Location] = {\"uri\": input}\n                bucket_owner: Final = self._extract_bucket_owner_from_params(inference_params)\n                if bucket_owner:","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py#L81-L117","documentation":"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.","triggerScenarios":"Thrown at litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}