Registry /
llm-agents / llama-index-llms-vertex
Install & Compatibility
Where this runs
tested against v0.7.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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 20.478s · 457.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 30.6s · import 11.248s · 451MB
479MB installed
● package 479MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Vertex
✓ from llama_index.llms.vertex import Vertex
✗ from llama_index.llms import Vertex
Correct import is the submodule path, not the top-level llms.
Initialize Vertex LLM with a Gemini model and call complete().
import os
from llama_index.llms.vertex import Vertex
# Ensure credentials are set
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'path/to/service-account.json'
llm = Vertex(
model='gemini-2.0-flash-001',
project='your-project-id',
location='us-central1',
)
resp = llm.complete('Hello, who are you?')
print(resp)
Errors
Common errors & fixes
google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials.
Missing or misconfigured Google Cloud credentials (service account file or ADC).
fixSet GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your service account JSON, or run `gcloud auth application-default login`.
google.api_core.exceptions.InvalidArgument: 400 Request contains an invalid argument.
Invalid model name or region. For example, using 'gemini-pro' instead of 'gemini-2.0-flash-001'.
fixDouble-check model name and location. Use `Vertex.available_models()` to see supported models for your project.
ModuleNotFoundError: No module named 'llama_index.llms.vertex'
Wrong import path. Users often try `from llama_index.llms import Vertex` but that doesn't work.
fixUse correct import: `from llama_index.llms.vertex import Vertex`.
TypeError: __init__() got an unexpected keyword argument 'temperature'
Constructor parameters like temperature, max_tokens are deprecated/removed in recent versions.
fixPass temperature and other generation config as keyword arguments to `llm.complete()` or `llm.chat()` instead of constructor.
Upgrade
Version history
0.7.0latest on PyPI · released Mar 12, 2026
Audit
Dependencies
google-cloud-aiplatformrequiredRequired for Vertex AI API calls