{"record":{"id":"f835444dcf3bf153","repo":"BerriAI/litellm","slug":"output-s3-uri-cannot-be-empty-for-async-invoke-req","errorCode":null,"errorMessage":"output_s3_uri cannot be empty for async invoke requests","messagePattern":"output_s3_uri cannot be empty for async invoke requests","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py","lineNumber":181,"sourceCode":"\n        Args:\n            model_input: The transformed TwelveLabs Marengo embedding request\n            model_id: The model identifier (without async_invoke prefix)\n            output_s3_uri: Optional S3 URI for output data config\n\n        Returns:\n            TwelveLabsAsyncInvokeRequest: The wrapped async invoke request\n        \"\"\"\n        import urllib.parse\n\n        # Clean the model ID\n        unquoted_model_id = urllib.parse.unquote(model_id)\n        if unquoted_model_id.startswith(\"async_invoke/\"):\n            unquoted_model_id = unquoted_model_id.replace(\"async_invoke/\", \"\")\n\n        # Validate that the S3 URI is not empty\n        if not output_s3_uri or output_s3_uri.strip() == \"\":\n            raise ValueError(\"output_s3_uri cannot be empty for async invoke requests\")\n\n        return TwelveLabsAsyncInvokeRequest(\n            modelId=unquoted_model_id,\n            modelInput=model_input,\n            outputDataConfig=TwelveLabsOutputDataConfig(\n                s3OutputDataConfig=TwelveLabsS3OutputDataConfig(s3Uri=output_s3_uri)\n            ),\n        )\n\n    def _transform_response(self, response_list: list[dict], model: str) -> EmbeddingResponse:\n        \"\"\"\n        Transform TwelveLabs response to OpenAI format.\n        Handles the actual TwelveLabs response format: {\"data\": [{\"embedding\": [...]}]}\n        \"\"\"\n        embeddings: Final[list[Embedding]] = []\n        total_tokens = 0\n\n        for response in response_list:","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py#L163-L199","documentation":"Request-wrapping guard for async TwelveLabs Marengo embeddings: async_invoke jobs deliver results to S3, so an output_s3_uri must accompany the request; wrapping the model input without one is rejected before the InvokeModel request is built.","triggerScenarios":"Thrown at litellm/llms/bedrock/embed/twelvelabs_marengo_transformation.py:181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty output_s3_uri for the async invoke request.","Set an S3 output location in litellm_params for async embedding jobs.","Verify the S3 URI is well-formed (s3://bucket/prefix)."],"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"}