From 2681770c5c2643090acb8ddc712b9ce30879dfd3 Mon Sep 17 00:00:00 2001 From: Yashwant Bezawada Date: Mon, 10 Nov 2025 02:17:16 -0600 Subject: [PATCH] fix: PrivateEndpoint.raw_predict parameter name Fixes #6101 Changed parameter name from 'body' to 'data' in PrivateEndpoint.raw_predict to match google-auth-transport's AuthorizedSession.post() API signature. The google-auth-transport library updated its API, changing the parameter name from 'body' to 'data'. The Endpoint class was already updated to use 'data', but PrivateEndpoint class was missed, causing TypeError when calling raw_predict() on PrivateEndpoint instances. This fix aligns PrivateEndpoint.raw_predict() with Endpoint.raw_predict() implementation. Signed-off-by: Yashwant Bezawada --- google/cloud/aiplatform/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/aiplatform/models.py b/google/cloud/aiplatform/models.py index e186b140ba..6c62ccef42 100644 --- a/google/cloud/aiplatform/models.py +++ b/google/cloud/aiplatform/models.py @@ -4150,7 +4150,7 @@ def raw_predict( url = f"https://{endpoint_override}/v1/projects/{self.project}/locations/{self.location}/endpoints/{self.name}:rawPredict" return self._authorized_session.post( url=url, - body=body, + data=body, headers=headers, )