googleapis / googleapis/google-cloud-java

Support Custom Endpoint from Vertex AI Model Garden

Open
#11,722 2 comments 0 reactions 0 assignees View on GitHub
priority: p3 type: feature request
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
154

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);`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.