Skip to content

Google Vertex AI embedder

Embeds through the Vertex AI text-embedding SDK using ambient GCP auth. Selected via EMBEDDING_PROVIDER=vertexai.

Enable it

bash
EMBEDDING_PROVIDER=vertexai
VERTEX_PROJECT=your-gcp-project
VERTEX_REGION=us-central1
VERTEX_EMBEDDING_MODEL=text-embedding-004
EMBEDDING_DIMS=768

pip install google-cloud-aiplatform (imported lazily only when this provider is selected).

Configuration

VariableDefaultDescription
EMBEDDING_PROVIDERopenaiSet to vertexai.
VERTEX_PROJECTnoneGCP project passed to vertexai.init.
VERTEX_REGIONus-central1GCP location passed to vertexai.init.
VERTEX_EMBEDDING_MODELtext-embedding-004Vertex embedding model.
EMBEDDING_DIMS768Vector dimension; must match the embedding model.

Notes

  • Credentials come from ambient GCP auth (application default credentials or workload identity), so there is no API key.
  • The vertexai SDK is heavy and needs GCP auth, so it is imported and initialized lazily only when the provider is actually selected.
  • If google-cloud-aiplatform is not installed, selecting this provider raises an ImportError with the install hint.

The memory layer for AI agents.