-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
I am trying to build a sample app that use Gemma3 custom model deployed on Vertex AI Model Garden.
The SDK seems does not provide a way to define custom endpoints like :
https://{endpointId}.{location}-{projectId}.prediction.vertexai.goog/v1/projects/{projectId}/locations/{location}/models/endpoints/{endpointId}:generateContent
When I try to use endpoint , the SDK will always include publishers/google in the URL which cause the app to fail with 404 UNIMPLEMENTED error.
wrong URL : https://{endpointId}.{location}-{projectId}.prediction.vertexai.goog/v1/projects/{projectId}/locations/{location}/**publishers/google/**models/endpoints/{endpointId}:generateContent
here is my code.
same issue occurs when using PredictionServiceClient.
`String endpoint = String.format("%s.%s-%s.prediction.vertexai.goog:443", endpointId, location,projectId);
VertexAI vertexAi = new VertexAI.Builder()
.setProjectId(projectId)
.setLocation(location)
.setTransport(Transport.REST)
.setApiEndpoint(endpoint)
.build();
GenerativeModel model = new GenerativeModel("endpoints/7871795169387872256", vertexAi);`