fix: Fix PrivateEndpoint.raw_predict parameter name#6107
Closed
yashwantbezawada wants to merge 4 commits intogoogleapis:mainfrom
Closed
fix: Fix PrivateEndpoint.raw_predict parameter name#6107yashwantbezawada wants to merge 4 commits intogoogleapis:mainfrom
yashwantbezawada wants to merge 4 commits intogoogleapis:mainfrom
Conversation
Fixes googleapis#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 <yashwant_b@me.com>
b689573 to
2681770
Compare
matthew29tang
approved these changes
Apr 23, 2026
copybara-service Bot
pushed a commit
that referenced
this pull request
Apr 23, 2026
-- 2681770 by Yashwant Bezawada <yashwant_b@me.com>: 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 <yashwant_b@me.com> COPYBARA_INTEGRATE_REVIEW=#6107 from yashwantbezawada:fix/private-endpoint-raw-predict-parameter e550151 PiperOrigin-RevId: 904180559
Contributor
|
Merged as 3d380ba |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6101
Description
Fixed
TypeErrorinPrivateEndpoint.raw_predict()caused by incorrect parameter name when callingAuthorizedSession.post().Problem
When calling
PrivateEndpoint.raw_predict()with PSC (Private Service Connect) based endpoints, the method crashed with:Root Cause
The google-auth-transport library updated its API, changing the parameter name from
bodytodataforAuthorizedSession.post().The
Endpoint.raw_predict()method was updated to usedata, butPrivateEndpoint.raw_predict()was missed and still usedbody.Changes
File:
google/cloud/aiplatform/models.pyLine: 4153
Changed:
To:
Testing
This fix aligns
PrivateEndpoint.raw_predict()with the already-correctedEndpoint.raw_predict()implementation (line 2744), which usesdata=body.The issue reporter confirmed the fix resolves the crash when calling
raw_predict()on PSC-based PrivateEndpoint instances.