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=768pip install google-cloud-aiplatform (imported lazily only when this provider is selected).
Configuration
| Variable | Default | Description |
|---|---|---|
EMBEDDING_PROVIDER | openai | Set to vertexai. |
VERTEX_PROJECT | none | GCP project passed to vertexai.init. |
VERTEX_REGION | us-central1 | GCP location passed to vertexai.init. |
VERTEX_EMBEDDING_MODEL | text-embedding-004 | Vertex embedding model. |
EMBEDDING_DIMS | 768 | Vector 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-aiplatformis not installed, selecting this provider raises an ImportError with the install hint.