{"record":{"id":"d4a417786a18407d","repo":"BerriAI/litellm","slug":"aws-region-name-is-required-for-s3-vectors","errorCode":null,"errorMessage":"aws_region_name is required for S3 Vectors","messagePattern":"aws_region_name is required for S3 Vectors","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/s3_vectors/vector_stores/transformation.py","lineNumber":63,"sourceCode":"        self,\n        non_default_params: dict,\n        optional_params: dict,\n        drop_params: bool,\n    ) -> dict:\n        for param, value in non_default_params.items():\n            if param == \"max_num_results\":\n                optional_params[\"maxResults\"] = value\n        return optional_params\n\n    def validate_environment(self, headers: dict, litellm_params: GenericLiteLLMParams | None) -> dict:\n        headers = headers or {}\n        headers.setdefault(\"Content-Type\", \"application/json\")\n        return headers\n\n    def get_complete_url(self, api_base: str | None, litellm_params: dict) -> str:\n        aws_region_name: Final = litellm_params.get(\"aws_region_name\")\n        if not aws_region_name:\n            raise ValueError(\"aws_region_name is required for S3 Vectors\")\n        if not re.match(r\"^[a-z][a-z0-9-]*$\", aws_region_name):\n            raise ValueError(\"Invalid aws_region_name format\")\n        return f\"https://s3vectors.{aws_region_name}.api.aws\"\n\n    def transform_search_vector_store_request(\n        self,\n        vector_store_id: str,\n        query: str | list[str],\n        vector_store_search_optional_params: VectorStoreSearchOptionalRequestParams,\n        api_base: str,\n        litellm_logging_obj: LiteLLMLoggingObj,\n        litellm_params: dict,\n        extra_body: dict[str, Any] | None = None,\n    ) -> tuple[str, dict]:\n        \"\"\"Sync version - generates embedding synchronously.\"\"\"\n        # For S3 Vectors, vector_store_id should be in format: bucket_name:index_name\n        # If not in that format, try to construct it from litellm_params\n        bucket_name: str","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/s3_vectors/vector_stores/transformation.py#L45-L81","documentation":"Configuration guard in the S3 Vectors vector-store config's URL construction: litellm_params carries no aws_region_name, so the regional S3 Vectors endpoint hostname cannot be composed and the request is rejected.","triggerScenarios":"Triggered when calling S3 Vectors without providing aws_region_name.","commonSituations":"See trigger scenarios.","solutions":["Pass aws_region_name in the request or litellm_params."],"exampleFix":"litellm.vector_stores.create(..., aws_region_name=\"us-east-1\")","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-14T00:17:10.932Z"}