Registry / llm-agents / llama-index-embeddings-vertex

llama-index-embeddings-vertex

JSON →
library0.5.0pypypiunverified

LlamaIndex integration for Google Vertex AI embeddings. Version 0.5.0 supports Gemini models (text-embedding-004, text-embedding-005) and legacy Gecko models. Requires Python >=3.10 and a Google Cloud project with Vertex AI enabled. Release cadence: irregular, tied to llama-index core updates.

pip install llama-index-embeddings-vertex
INSTALL
IMPORT
SIG · LLAMA-INDEX-EMBEDD
L
llama-index-embeddings-vertex
llm-agentspythonv0.5.0
Install
30.6s avg
Import
Disk
479MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 457.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 30.6s · import 0.000s · 451MB
479MB installed
● package 479MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

VertexEmbedding
from llama_index.embeddings.vertex import VertexEmbedding
from llama_index.embeddings.vertex import VertexEmbedding

Initialize VertexEmbedding with model name and project. Authentication via GOOGLE_APPLICATION_CREDENTIALS env var (service account) or default credentials.

import os from llama_index.embeddings.vertex import VertexEmbedding # Set credentials (recommended: service account JSON path) os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/service-account.json" embed_model = VertexEmbedding( model_name="text-embedding-004", # or "textembedding-gecko@003" project="your-gcp-project-id", location="us-central1", ) embeddings = embed_model.get_text_embedding("Hello, world!") print(len(embeddings)) # 768 for text-embedding-004
Debug
Known issues
breakingVersion 0.2.0 moved VertexEmbedding from llama_index.embeddings.vertex_ai to llama_index.embeddings.vertex. Old import will break.
fix
Change 'from llama_index.embeddings.vertex_ai import VertexEmbedding' to 'from llama_index.embeddings.vertex import VertexEmbedding'.
affects: <0.2.0
deprecatedLegacy Gecko models (textembedding-gecko@001, @002, @003) are deprecated and may be removed in future versions. Use text-embedding-004 or later.
fix
Set model_name='text-embedding-004' or 'text-embedding-005' (if available).
affects: 0.5.0
gotchaThe 'project' parameter is required; omitting it defaults to the project set in gcloud config, which may be unexpected.
fix
Always pass 'project' explicitly to VertexEmbedding().
affects: all
Upgrade
Version history
0.5.0latest on PyPI · released Mar 12, 2026
Audit
Dependencies
llama-index-corerequiredBase classes and embeddings interface
google-cloud-aiplatformrequiredVertex AI SDK for API calls
google-authrequiredAuthentication and service account handling
Agent activity
26 hits · last 30 days
node
22
OpenAI (training)
1
Resources
llama-index-embeddings-vertex — pip install llama-index-embeddings-vertex · libregistry