Vertex AI
Provider vertex. Adapter over Google Cloud's Vertex AI — the same
Gemini models (and partners, like Claude on Vertex), but inside your GCP
project, with Google Cloud's IAM, billing and data residency. It reuses the
google-genai SDK in Vertex mode; only the authentication changes (project +
region, no GEMINI_API_KEY).
pip install "jangada-ai[gemini]"provider=:"vertex"- Environment variables:
GOOGLE_CLOUD_PROJECT(project ID),GOOGLE_CLOUD_LOCATION(e.g.us-central1) andGOOGLE_APPLICATION_CREDENTIALSpointing to the service account JSON (or ADC already set up viagcloud auth application-default login). - Model: the Gemini model name, e.g.
gemini-2.5-flash,gemini-2.5-pro.
from jangada_ai import LLM
# uses GOOGLE_CLOUD_PROJECT / GOOGLE_CLOUD_LOCATION / ADC from the env
llm = LLM("vertex", "gemini-2.5-flash")
resp = llm.complete("Summarize {{ topic }} in one sentence.", topic="rafts")
print(resp.text, resp.cost)Configuration via environment
GOOGLE_CLOUD_PROJECT=my-project-123
GOOGLE_CLOUD_LOCATION=us-central1
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.jsonproject and location can be passed explicitly in the constructor (via
extra=) when you need another project/region without touching the environment.
Authentication uses Application Default Credentials — there is no API key
like with direct Gemini.
What it does
Everything the gemini provider does, since they share the google-genai SDK:
- Text, streaming and structured output (
parse) withconfig.response_schema. - Vision (
images=), documents (files=) and audio. - Embeddings (e.g.
gemini-embedding-001) for RAG.
When to choose Vertex AI
When the team is already on Google Cloud and needs Gemini models under GCP's
IAM, billing and governance (and per-region data residency), instead of the
direct Gemini API key. The code is identical to Gemini — swap
LLM("gemini", ...) for LLM("vertex", ...). See Gemini
and Providers.
What changed in 1.9.0
- For
gemini-3*models without an explicitlocation=, the library useslocation="global"(3.x models are usually not inus-central1); an explicitlocation=always wins. - Vertex inherits the Gemini profile rules (e.g.
thinking_budget→thinking_levelon 3.x). - Native tools work, but mixing a native tool with a function tool raises
UnsupportedError(the field that allows it only exists in the Gemini API).
Azure OpenAI
Provider azure. The same OpenAI models (GPT-4o, GPT-4.1, o-series…) served by Azure OpenAI Service, through jangada's normalized API, authenticating with your Azure resource endpoint + key.
Structured output (Pydantic)
A single parse() call returns a validated Pydantic instance, regardless of how each provider implements it under the hood.