{"record":{"id":"7205e6149aae2824","repo":"BerriAI/litellm","slug":"error-reading-gcs-bucket-response-e","errorCode":null,"errorMessage":"Error reading GCS bucket response: {e}","messagePattern":"Error reading GCS bucket response: (.+?)","errorType":"http","errorClass":"VertexAIError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/files/transformation.py","lineNumber":848,"sourceCode":"            return extracted_file_data_content\n        raise ValueError(\"Unsupported file content type\")\n\n    def transform_create_file_response(\n        self,\n        model: str | None,\n        raw_response: Response,\n        logging_obj: LiteLLMLoggingObj,\n        litellm_params: dict,\n    ) -> OpenAIFileObject:\n        \"\"\"\n        Transform VertexAI File upload response into OpenAI-style FileObject\n        \"\"\"\n        response_json: Final[GcsBucketResponse] = raw_response.json()\n\n        try:\n            response_object: Final = GcsBucketResponse(**response_json)\n        except Exception as e:\n            raise VertexAIError(\n                status_code=raw_response.status_code,\n                message=f\"Error reading GCS bucket response: {e}\",\n                headers=raw_response.headers,\n            )\n\n        gcs_id = response_object.get(\"id\", \"\")\n        # Remove the last numeric ID from the path\n        gcs_id = \"/\".join(gcs_id.split(\"/\")[:-1]) if gcs_id else \"\"\n\n        return OpenAIFileObject(\n            purpose=response_object.get(\"purpose\", \"batch\"),\n            id=f\"gs://{gcs_id}\",\n            filename=response_object.get(\"name\", \"\"),\n            created_at=_convert_vertex_datetime_to_openai_datetime(\n                vertex_datetime=response_object.get(\"timeCreated\", \"\")\n            ),\n            status=\"uploaded\",\n            bytes=int(response_object.get(\"size\", 0)),","sourceCodeStart":830,"sourceCodeEnd":866,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/files/transformation.py#L830-L866","documentation":"Parsing the GCS bucket XML/JSON response into GcsBucketResponse failed (unexpected schema or malformed body) while transforming the file-upload result; the underlying exception is wrapped for diagnosis.","triggerScenarios":"Triggered when reading the GCS bucket response during a Vertex AI files operation raises an exception.","commonSituations":"See trigger scenarios.","solutions":["Inspect exception e; check GCS bucket permissions and object existence.","Verify credentials have storage access."],"exampleFix":"# test bucket access with the same service account via gsutil.","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"}