{"record":{"id":"f0cb6cf0485e0e12","repo":"BerriAI/litellm","slug":"bedrockfilesconfig-does-not-support-file-listing","errorCode":null,"errorMessage":"BedrockFilesConfig does not support file listing","messagePattern":"BedrockFilesConfig does not support file listing","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/files/transformation.py","lineNumber":1205,"sourceCode":"        litellm_params: dict,\n    ) -> tuple[str, dict]:\n        raise NotImplementedError(\"BedrockFilesConfig does not support file deletion\")\n\n    def transform_delete_file_response(\n        self,\n        raw_response: httpx.Response,\n        logging_obj: LiteLLMLoggingObj,\n        litellm_params: dict,\n    ) -> FileDeleted:\n        raise NotImplementedError(\"BedrockFilesConfig does not support file deletion\")\n\n    def transform_list_files_request(\n        self,\n        purpose: str | None,\n        optional_params: dict,\n        litellm_params: dict,\n    ) -> tuple[str, dict]:\n        raise NotImplementedError(\"BedrockFilesConfig does not support file listing\")\n\n    def transform_list_files_response(\n        self,\n        raw_response: httpx.Response,\n        logging_obj: LiteLLMLoggingObj,\n        litellm_params: dict,\n    ) -> list[OpenAIFileObject]:\n        raise NotImplementedError(\"BedrockFilesConfig does not support file listing\")\n\n    def transform_file_content_request(\n        self,\n        file_content_request: FileContentRequest,\n        optional_params: Mapping[str, object],\n        litellm_params: MutableMapping[str, object],\n    ) -> tuple[str, dict[str, str]]:\n        \"\"\"\n        Build a SigV4-signed S3 GetObject request for a Bedrock batch file.\n","sourceCodeStart":1187,"sourceCodeEnd":1223,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/bedrock/files/transformation.py#L1187-L1223","documentation":"BedrockFilesConfig keeps files only as objects in your S3 bucket, so there is no provider-side listing to translate; the request-side list-files transform raises NotImplementedError. Listing is expected to be done against S3 directly (or your own metadata store).","triggerScenarios":"client.files.list() / GET /v1/files with a bedrock model in scope; admin dashboards enumerating uploaded batch files through the proxy.","commonSituations":"Generic OpenAI-compatible UIs and CLIs that always call the list endpoint; migration from OpenAI batch tooling that lists files to show job status.","solutions":["List batch objects with boto3 list_objects_v2 on the configured bucket (respecting s3_output_bucket_name if set)","Maintain your own file registry keyed by the s3:// file id returned from create","Guard list calls on provider so Bedrock deployments take the S3 branch"],"exampleFix":"# before\nfiles = await client.files.list()\n\n# after (Bedrock)\nfiles = s3.list_objects_v2(Bucket=os.environ[\"AWS_S3_BUCKET_NAME\"], Prefix=\"litellm-bedrock-batches/\")","handlingStrategy":"fallback","validationCode":"def list_files_for_provider(client, s3, bucket: str, provider: str):\n    if provider.startswith(\"bedrock\"):\n        return s3.list_objects_v2(Bucket=bucket).get(\"Contents\", [])\n    return client.files.list()","typeGuard":null,"tryCatchPattern":"try:\n    files = await client.files.list()\nexcept NotImplementedError:\n    files = s3.list_objects_v2(Bucket=os.environ[\"AWS_S3_BUCKET_NAME\"]).get(\"Contents\", [])","preventionTips":["Keep your own registry of uploaded batch files keyed by s3:// id","Disable/guard list calls in generic tools when the target is Bedrock"],"tags":["bedrock","files-api","unsupported-operation","s3","litellm"],"backgroundTag":"unsupported-operation","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}