{"record":{"id":"2aadd8439960c235","repo":"BerriAI/litellm","slug":"output-s3-uri-is-required-for-async-invoke-request","errorCode":null,"errorMessage":"output_s3_uri is required for async invoke requests","messagePattern":"output_s3_uri is required for async invoke requests","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/embed/amazon_nova_transformation.py","lineNumber":233,"sourceCode":"\n        Args:\n            model_input: The transformed Nova embedding request\n            model_id: The model identifier (without async_invoke prefix)\n            output_s3_uri: S3 URI for output data config\n\n        Returns:\n            dict: 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 is required for async invoke requests\")\n\n        return {\n            \"modelId\": unquoted_model_id,\n            \"modelInput\": model_input,\n            \"outputDataConfig\": {\"s3OutputDataConfig\": {\"s3Uri\": output_s3_uri}},\n        }\n\n    def _transform_response(\n        self,\n        response_list: list[dict],\n        model: str,\n        batch_data: list[dict] | None = None,\n    ) -> EmbeddingResponse:\n        \"\"\"\n        Transform Nova response to OpenAI format.\n\n        Nova response format:\n        {","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/embed/amazon_nova_transformation.py#L215-L251","documentation":"Async invocation of Amazon Nova embedding models (model id prefixed with 'async_invoke/') writes results to S3, so an output_s3_uri is mandatory. The check rejects a missing, empty, or whitespace-only value before the request is built.","triggerScenarios":"Calling bedrock/async_invoke/amazon.nova-embed-... without output_s3_uri, or passing a value that is only spaces; also forgetting to forward the parameter through proxy config.","commonSituations":"Configuring model names with the async_invoke/ prefix for large batch embeddings but not wiring the S3 output location, or environment-specific config where the S3 var is unset only in one deployment.","solutions":["Pass a valid output_s3_uri (s3://bucket/prefix) with the async invoke request","Ensure the bucket exists and the Bedrock service principal can write to it","If async behavior is unintended, drop the async_invoke/ prefix from the model name"],"exampleFix":"# before\nlitellm.embedding(model='bedrock/async_invoke/amazon.nova-embed-v1:0', input=[...])\n\n# after\nlitellm.embedding(\n    model='bedrock/async_invoke/amazon.nova-embed-v1:0',\n    input=[...],\n    output_s3_uri='s3://my-bucket/nova-embed-output/',\n)","handlingStrategy":"validation","validationCode":"def validate_async_invoke(model: str, output_s3_uri: str | None) -> None:\n    if model.startswith(\"async_invoke/\") and not (output_s3_uri and output_s3_uri.strip()):\n        raise ValueError(\"output_s3_uri is required for async invoke requests\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pair every async_invoke/ model with a configured output_s3_uri in the model settings","Verify the output bucket is writable by Bedrock before enabling async embeddings"],"tags":["bedrock","nova","embedding","s3","async"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}