Jangada AIJangada AI

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) and GOOGLE_APPLICATION_CREDENTIALS pointing to the service account JSON (or ADC already set up via gcloud 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.json

project 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) with config.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 explicit location=, the library uses location="global" (3.x models are usually not in us-central1); an explicit location= always wins.
  • Vertex inherits the Gemini profile rules (e.g. thinking_budget → thinking_level on 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).

On this page