Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#13280·weaviate

gemini-embedding-2 cannot be used via Vertex AI (only :predict is ever called, model only supports :embedContent)

Author: AlexRojas06Created Sep 25, 2026Updated Sep 25, 2026
Labelscommunity

Description

The docs for the Google multimodal vectorizer (https://docs.weaviate.io/weaviate/model-providers/google/embeddings-multimodal) list gemini-embedding-2 as a valid modelId and state it is "available via both Vertex AI and Google AI Studio". However, gemini-embedding-2 cannot actually be used through the Vertex AI code path in multi2vec-google (reproduced on v1.39.6).

Root cause

On Vertex AI, gemini-embedding-2 is only served via the :embedContent method, and only at the global location. Confirmed directly against the Vertex AI API (project with the model enabled):

  • POST .../locations/global/.../gemini-embedding-2:embedContent → 200
  • POST .../locations/global/.../gemini-embedding-2:predict → 404 "Publisher model not found"
  • POST .../locations/{region}/.../gemini-embedding-2:predict → 404 (tested 11 regions, incl. us-central1, us-east4, europe-west4)

But the module only ever calls :predict for Vertex AI:

modules/multi2vec-google/clients/google.go, buildURL():

go
return fmt.Sprintf("https://%s-aiplatform.googleapis.com/v1/projects/%s/locations/%s/publishers/google/models/%s:predict",
    location, projectID, location, model)

This also ignores the configured apiEndpoint for Vertex and always derives the host from location, so location: "global" produces the non-existent host global-aiplatform.googleapis.com (a plain HTML 404 from GFE, not a JSON error — this is what surfaces to users as a "failed to parse vectorization response ... invalid character '<'" error).

PR #11118 (the change referenced by "Added in v1.36.13" in the docs) only touches AI Studio test cases and renames gemini-embedding-2-preview → gemini-embedding-2; it never added a Vertex AI path for this model.

Impact

Anyone following the documented modelId: gemini-embedding-2 option with Vertex AI (project_id/location set, USE_GOOGLE_AUTH=true, no API key) gets a confusing error instead of a clear "not supported" message.

Suggested fix

Support gemini-embedding-2 on Vertex AI by calling :embedContent at the global location (host aiplatform.googleapis.com) when this model is selected.

Environment

  • Weaviate: v1.39.6
  • Module: multi2vec-google
  • Python client: weaviate-client 4.23.1

Source: weaviate/weaviate

View original on GitHubView discussion on GitHub