{"record":{"id":"65ae7c72d6b3966f","repo":"BerriAI/litellm","slug":"failed-to-download-file-from-gcs-decoded-file-id","errorCode":null,"errorMessage":"Failed to download file from GCS: {decoded_file_id}","messagePattern":"Failed to download file from GCS: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/files/handler.py","lineNumber":155,"sourceCode":"        )\n        bucket_name, object_path = self._extract_bucket_and_object_from_file_id(\n            file_id=file_id,\n            configured_bucket_name=gcs_logging_config[\"bucket_name\"],\n            litellm_params=litellm_params,\n        )\n\n        download_kwargs: Final = {\n            \"standard_callback_dynamic_params\": {\n                \"gcs_bucket_name\": bucket_name,\n                \"gcs_path_service_account\": gcs_logging_config[\"path_service_account\"],\n            }\n        }\n\n        file_content: Final = await self.download_gcs_object(object_name=object_path, **download_kwargs)\n        decoded_file_id: Final = unquote(file_id)\n\n        if file_content is None:\n            raise ValueError(f\"Failed to download file from GCS: {decoded_file_id}\")\n\n        mock_response: Final = httpx.Response(\n            status_code=200,\n            content=file_content,\n            headers={\n                \"content-type\": \"application/octet-stream\",\n                \"content-length\": str(len(file_content)),\n            },\n            request=httpx.Request(method=\"GET\", url=decoded_file_id),\n        )\n\n        # Apply transformation to convert Vertex AI batch outputs to OpenAI format\n        config: Final = VertexAIFilesConfig()\n\n        # Create a logging object for transformation\n        logging_obj: Final = Logging(\n            model=\"\",\n            messages=[],","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/files/handler.py#L137-L173","documentation":"Raised when the GCS download of a Vertex AI file object fails: the decoded file_id (bucket/object path) is embedded. Fires when the object does not exist, credentials lack storage access, or the bucket/object extraction produced an invalid target.","triggerScenarios":"Triggered when downloading a file from GCS fails for the decoded file_id.","commonSituations":"See trigger scenarios.","solutions":["Verify the GCS object exists and credentials have read access.","Check that the decoded file id maps to a valid gs:// path."],"exampleFix":"# test access: gsutil cat gs://bucket/object with the same service account.","handlingStrategy":"try-catch","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-14T05:17:10.506Z"}