#1085·vanna

Support for Vertex AI endpoint in GeminiLlmService class

Author: AlessandroSpallinaCreated Feb 4, 2026Updated Mar 26, 2026

Is your feature request related to a problem? Please describe. When using Vanna AI isn't straightforward to use the Vertex AI API scheme, only the "new" Gemini interface is usable.

Describe the solution you'd like Vanna is using the google.genai library that under the hood supports a vertexai boolean to internally switch API scheme. This isn't exported from byvanna.integrations.google.GeminiLlmService class to the user, I propose to just expose it.

What I want to achive is a usage like:

python
from vanna.integrations.google import GeminiLlmService

llm = GeminiLlmService(
    "gemini-2.5-flash-lite",
    "real-api-key",
    1.0,
    vertexai=True
)

Describe alternatives you've considered

With the current Vanna version, the only way to use the Vertex API scheme is the following:

python
from google import genai
from vanna.integrations.google import GeminiLlmService


llm = GeminiLlmService(
    "gemini-2.5-flash-lite",
    "fake-token",
    1.0
)

llm._client = genai.Client(api_key="real-api-key", vertexai=True)

Edit: I just found out that you can, alternatively, just set the GOOGLE_GENAI_USE_VERTEXAI environment variable to true, source