LiteLLM with Google Vertex AI (Gemini Enterprise Agent Platform)

Connect a self-hosted LiteLLM gateway to Gemini and partner models on Vertex AI using the vertex_ai/ route, GCP service account credentials and explicit project and region settings. Covers what the 2026 rename changes and what it leaves alone.

On this page

How LiteLLM connects Gemini models through the vertex_ai route

A platform team that needs Gemini and partner models behind one governed gateway should connect Vertex AI to LiteLLM through the vertex_ai/ route. LiteLLM sends these calls using the OpenAI request format, so application teams send OpenAI-style requests to the gateway and never handle Google endpoints directly. The 2026 rename of Vertex AI to Gemini Enterprise Agent Platform changes the product name, but LiteLLM's documentation states that the API host, model IDs, authentication and request shapes are unchanged, so existing vertex_ai/ model entries keep working. Confirm that statement against your own model list and a test call before you migrate any configuration. The LiteLLM Vertex AI documentation covers the current route settings.

The supported method is Google service account credentials that the gateway uses to call Vertex AI, with a project and region set for the deployment. Decide who owns the service account, grant it only the roles needed for the models you approve, and document which project and location each model entry uses. Store the key file in a secret manager instead of in a configuration file or image, and confirm which secret manager integration your edition supports, since LiteLLM Enterprise lists Google among its secret manager options. Rotation of this key is a Google-side and gateway-side task, so assign an owner for both before go-live.

Google credentials sit only on the gateway. Callers authenticate with LiteLLM virtual keys, which are stored in PostgreSQL and enforce per-key, per-user and per-team budgets, TPM and RPM limits and model restrictions before any request reaches Vertex AI. The gateway records request and spend data against the key or team that made each call, so Google billing shows one service account while your internal reports show the consuming team. Before you rely on these reports for chargeback, reconcile gateway spend with the Vertex AI billing export for a sample period and confirm that the two totals agree within a tolerance your finance team accepts.

What you need in place before configuring Vertex AI in LiteLLM

Six prerequisites shape the Vertex AI configuration before any model route is added. Most setup failures trace back to a missing permission, an unconfirmed model region, or a proxy state store that was never provisioned.

GCP project with Vertex AI enabled

Confirm that the Google Cloud project that will bill and host Gemini and partner model calls has the Vertex AI API enabled. Record the project ID exactly, because the LiteLLM vertex_project setting depends on it. Decide whether one project serves all teams or whether separate projects hold separate billing and quota, since that choice drives how you later split spend and limits.

Service account with model access

Create a dedicated service account for the gateway and grant it only the Vertex AI roles needed to call the models you approved. Avoid reusing a personal account or a broad project owner role. Keep one service account per environment so that rotating or revoking a key in staging does not affect production traffic.

PostgreSQL for virtual keys

Virtual keys, per-key budgets and spend records need a PostgreSQL database. Provision it before you configure Vertex AI routes so that keys can be issued against the same gateway from the start. Plan backups and access for this database as you would for any store that holds spend and key metadata.

LiteLLM on a supported release line

Install a release that is on a supported minor line. The GitHub releases page lists v1.105.1, published October 14, 2026, as the latest release. Pin the image version in your deployment manifests and record it, because the upgrade plan for your gateway depends on knowing which line you started on.

LiteLLM releases

Secret storage for the service account key

Store the service account JSON key in a secret manager or a Kubernetes secret mounted into the proxy, never in the configuration file committed to source control. Also keep LITELLM_MASTER_KEY, which must start with sk-, in the same managed store. Define who can read these secrets and how a key rotation will be carried out without downtime.

Redis and regional model availability

Once more than one proxy instance runs, provision Redis 7.0 or newer for shared rate limits, router state and cache. Separately, confirm with Google which Gemini and partner models are available in each region you plan to use, because a model missing from your chosen region will fail at route time even when the configuration is correct.

LiteLLM Vertex AI docs

Configuring the Vertex AI route step by step

This sequence takes a self-hosted LiteLLM proxy from a Google Cloud project with no access to a working Gemini route that callers reach through one virtual key with a budget. Each step ends with a check you can run before moving on.

  1. Create a dedicated service account with narrow roles

    In the Google Cloud project that will bill for model calls, create a service account used only by the LiteLLM proxy, not by people or other workloads. Grant it the narrowest Vertex AI role that allows prediction calls to the models you plan to expose, and confirm the exact role name in the current Google Cloud documentation before you assign it. Do not grant project owner or editor. Check: the service account appears in IAM with only the roles you chose, and a reviewer can explain why each one is there.

  2. Generate the key and store it in a secret manager

    Create a JSON key for the service account and load it into the secret manager your platform team already operates, such as the one your Kubernetes cluster or cloud account provides. Delete the local copy and restrict read access to the workload identity that runs the proxy. Mount the secret into the proxy container at runtime rather than baking it into an image or a config file in source control. Check: the key file no longer exists on any laptop or build server, and only the proxy's identity can read the secret.

  3. Set the project and region in the proxy config

    In the proxy configuration file, set the Google Cloud project ID and the region for the Vertex AI endpoint, and point the credential reference at the mounted secret path. Choose the region based on where your data is allowed to be processed and which models are offered there, and confirm model availability per region with Google. Keep these values in version-controlled config so changes go through review. Check: the proxy starts and logs no credential or project resolution errors.

  4. Add a model entry with the vertex_ai prefix

    Add a model_list entry whose litellm_params model value uses the vertex_ai/ prefix followed by the Gemini model ID you have verified for your project and region, and give it a stable public model name that callers will use. The route name stays vertex_ai/ even though Google renamed the product to Gemini Enterprise Agent Platform in 2026, because LiteLLM states the API host, model IDs, authentication and request shapes are unchanged. Check: the proxy's model list shows the new name and the proxy reports it as healthy.

  5. Send a test request through the proxy

    Create a test request to the proxy's OpenAI-compatible chat completions endpoint, using a master key or an administrative key, and address it to the public model name you defined. Confirm the response comes back from Gemini and that the proxy's logs show the request was routed to Vertex AI, not to another provider. If the call fails, check the service account roles, the region and the model ID before changing anything else. Check: a completion returns with status success and the log entry names the expected route.

  6. Issue a virtual key scoped to one model

    Create a virtual key for a single team or application with its allowed models limited to the Vertex AI model name only. Use the key, not the master key, for the same test request and confirm that a request to any other model is refused. Keeping callers on virtual keys makes later budget, rate limit and logging controls possible without changing application code. Check: the scoped key succeeds on the permitted model and is rejected for an unlisted one.

  7. Set a budget and confirm spend is recorded

    Attach a budget to the virtual key or its team, then send a few test requests with the scoped key. Open the spend view in the proxy and confirm that the requests appear with a cost attributed to the key. Compare the recorded cost against the Google Cloud billing report for the same period, and ask your finance or FinOps owner to agree on how differences will be reconciled. Check: the budget shows consumed spend that matches the test calls within the tolerance your team agreed.

Choosing regional or global endpoints for Gemini traffic

The core decision is whether each Gemini or partner model call goes to a named region or to a global endpoint. A named region keeps request processing in a location you choose, which matters when data residency rules or latency targets apply to prompts. A global endpoint gives Google more freedom to serve the request from wherever capacity and model coverage are available, which helps availability and access to newer models that may not be offered in every region. Neither choice is automatically safer, so decide it per use case rather than once for the whole gateway.

Before you set vertex_ai_location or equivalent settings in the LiteLLM configuration, confirm three things. First, check which endpoint type each model you plan to expose supports in the LiteLLM version you run, because support differs by model and changes over time. Second, check the data residency requirements that your compliance and legal teams have written for prompts and responses, including where logs and cached content are stored by the gateway itself. Third, check whether your Google Cloud organization policies restrict the locations you can use. The answers determine whether a global route is permitted for a given team at all.

Avoid mixing regions for the same model name without recording it. If you define two deployments of one model in different regions for load balancing or failover, document which region serves which deployment, and make sure the router configuration, budgets and logs all show the region. Otherwise a failover can silently move regulated traffic outside the approved location, and cost and latency reports will not explain the difference. Review the endpoint choice whenever you upgrade LiteLLM or add a model, and test a sample request against each route in your own project.

Mapping Google project, region and identity settings to LiteLLM fields

This table pairs each Google Cloud setting with the LiteLLM field that carries it, so you can see which values the caller, the gateway and Google each own. Read it top to bottom when building a model entry, then check the last rows for the values Google never receives. The main takeaway is that the caller only ever sees the LiteLLM model name and virtual key, while project, region and service account stay in the gateway configuration.

SettingWhere it lives in LiteLLMWhat it controlsWhat to confirm
GCP project IDvertex_project in litellm_paramsThe Google Cloud project that is billed and that hosts the model callsProject has the Vertex AI API enabled and the target models are available in it
Locationvertex_location in litellm_paramsThe region used for the API host, such as a regional or global endpointThe chosen model is offered at that location and the data residency rule allows it
Service account credentialsvertex_credentials in litellm_params, ideally sourced from a secret managerThe identity LiteLLM uses to call Google, which determines IAM permissionsThe account has only the Vertex AI role it needs and its key is rotated under your policy
Caller model namemodel_name in model_listThe alias applications send in their requests, so providers can change without caller changesCallers use only the alias and never the Google model ID
Underlying model stringmodel in litellm_params, prefixed with vertex_ai/The Google model ID that LiteLLM forwards, such as a Gemini or partner modelThe model ID matches the current Google model catalog for your location
Virtual key model restrictionmodels list on the virtual keyWhich aliases a key may call, so a team cannot reach models it was not grantedKeys list aliases, not vertex_ai/ strings, and each team has its own key
Master keyLITELLM_MASTER_KEY, stored in a secret managerAdministrative access to the proxy, including key creation and config viewsKey begins with sk- and never reaches Google or application code
Budgets and spend trackingVirtual key, user and team budgets stored in the LiteLLM databaseSpend limits and cost records kept by the gateway, not by GoogleBudgets are enforced at the gateway and reconciled to Google billing separately

How a request travels from caller to Vertex AI through LiteLLM

The flow starts at a calling application that sends a request with a LiteLLM virtual key to the proxy inside the client network. The proxy checks that key, its budget and the model it requests before the router selects a Vertex AI deployment. Only then does the call cross the trust boundary to Google Cloud, authenticated with the service account credentials configured for the proxy. The response returns to the caller, and the spend record is written to PostgreSQL. Confirm that the key, budget and model checks run before any Google Cloud call is made.

Request path from a virtual key holder through the proxy to Vertex AI, with the trust boundary marked.

Hardening the Google credentials behind the gateway

The gateway holds the keys to your Google Cloud project, so every route into those credentials needs a deliberate control. The cards below cover the service account, the key file, rotation, virtual key scoping, the master key and admin access, in the order a reviewer is likely to check them.

Scope the service account tightly

Create a dedicated service account for LiteLLM in the Google Cloud project that serves Gemini and partner models, and grant only the Vertex AI roles needed for the model calls the gateway makes. Keep it separate from accounts used by notebooks, pipelines or other applications so that a compromise or a misconfigured role does not reach unrelated resources. Ask your cloud team to review the granted roles against the models you have actually enabled.

Vertex AI docs

Keep the JSON key out of files and images

The service account key is a long-lived secret, so it should not be copied into config.yaml, a Git repository, a container image or a build log. Supply it at runtime from a secret manager or a mounted secret, and confirm that the file path or credential variable in your LiteLLM configuration points at that runtime location. Ask whether your platform can use workload identity instead of a downloaded key, and record the decision with your security team.

Rotate service account credentials

Set a rotation schedule for any downloaded service account key and a runbook that covers creating the new key, updating the secret, restarting or rolling the proxy pods, confirming Gemini calls succeed, and then deleting the old key. Plan the rotation so that the old key remains valid only until the new one is in use. Confirm with your Google Cloud administrators how key expiry and audit logging are configured in your organization.

Restrict which virtual keys reach Gemini

Virtual keys can be limited to specific models, so issue keys for Gemini routes only to the teams and service accounts that need them. Pair that with per-key or per-team budgets and TPM or RPM limits so that one key cannot drain the Google project's quota or spend. Review the model allow-lists whenever a new Vertex AI model is added to the configuration.

Store LITELLM_MASTER_KEY in a secret manager

The master key must start with sk- and grants full administrative control over the proxy, so keep it in a secret manager and out of Helm values, environment files and shell history. Limit who can read that secret, rotate it on a defined schedule, and issue day-to-day keys to people and services instead of sharing the master key. Confirm which secret manager your organization already audits before choosing one.

Limit admin UI access and SSO scope

Restrict the admin UI to a network range or an internal entry point, and decide who holds admin roles before the first deployment. Free SSO covers up to five users from v1.76.0 onward, so a larger administrator group needs the Enterprise edition, and Google secret manager integrations are also an Enterprise feature. Ask your vendor to confirm current licensing terms before you plan the admin group.

Free SSO limit
5 users
Admin UI SSO docs

Why Vertex AI calls fail through LiteLLM and how to fix them

This table lists the failures teams most often hit when a LiteLLM gateway calls Gemini or partner models on Vertex AI, with the likely cause and the fix for each. Read it as a triage guide: match the error your callers see to a row, check the cause against your project and key setup, then apply the fix and retest with a single model before reopening traffic.

FailureLikely causeFix
Permission denied on the service accountThe service account behind the key file lacks a Vertex AI role on the target project, or the API is not enabled thereGrant the service account a Vertex AI user role on the project that holds the models, confirm the Vertex AI API is enabled, and retest with one model
Model not found with the right model IDThe project or region in the LiteLLM model entry does not match where the model is deployed or enabledCheck the vertex_project and vertex_location values in the model entry against the console, then correct the region before changing the model ID
Model unavailable in the chosen regionThe model is not offered in the configured location, so the regional endpoint returns no matchConfirm model availability for that region in Google's documentation, move the deployment to a supported region, or use the global endpoint where the model supports it
Expired or missing key fileThe JSON key file path in the environment or config is wrong, the file was not mounted into the container, or the key was rotated or revokedMount the key from your secret manager into the pod or container, verify the path, and issue a new key when the old one has expired or been revoked
Cost mismatch against the provider billThe model string in LiteLLM does not match the billed model name, so spend is priced with the wrong or a default rateSet the model string to the exact model ID on the Vertex AI invoice, compare LiteLLM spend with a test call's billed line item, and fix the pricing mapping before relying on budgets
Requests succeed but budgets look wrongAliases in the model list point to different billed models, so spend is recorded under a name that does not match the billKeep one alias per billed model, document the mapping in configuration, and reconcile a sample of requests against the invoice each billing cycle

What the Gemini Enterprise Agent Platform rename changes and what it leaves alone

The 2026 rename of Vertex AI to Gemini Enterprise Agent Platform is a naming change, and according to LiteLLM's Vertex AI documentation it leaves the API host, model IDs, authentication and request shapes unchanged. The practical result is that an existing vertex_ai/ route in your LiteLLM config stays valid, and you do not need to rewrite model entries, change vertex_project or vertex_location, or alter the service account setup that already works. Treat the rename as a labeling event for your team, not a migration. Before you change anything, confirm the current behavior in the LiteLLM Vertex AI docs, since LiteLLM updates its provider pages alongside releases.

Most of the rework falls on documentation and operations rather than the gateway. Recheck the console labels your administrators use to find the project, service account and quota pages, and update any runbook step that names the old product. Also review internal links, ticket templates, architecture diagrams and the approved-provider list that your security or procurement team maintains, so that the Google product name in your records matches what the console shows. Where a runbook refers to the old name in a search query or alert description, update the alert rule text too, but do not change the vertex_ai/ prefix or the project settings in the LiteLLM config to match the new name.

Do not assume that a newly announced agent feature, console workflow or managed capability is available through LiteLLM just because it sits under the new product name. The rename does not establish support for new features. Before you build a control, budget or approval process around one, confirm with Google whether the feature is generally available in your region, whether it has its own API surface, and whether it is billed through the same SKUs that your spend tracking already reads. Ask LiteLLM whether a new feature is supported before you depend on it, and test it in a non-production project first.

Questions buyers ask before connecting Gemini through LiteLLM

What drives the effort of connecting Vertex AI to LiteLLM?

The effort depends less on the LiteLLM route itself and more on what surrounds it: how many GCP projects and regions you call, whether Gemini and partner models are both in scope, how callers authenticate to the gateway, and how spend must be attributed to teams. A single project with one service account and a handful of models is a small configuration task. Effort grows with each project, region, model family and team that needs its own key, budget or log view. Ask any partner to break the quote down by these items so you can see which ones you are paying for.

Can our platform team connect Vertex AI through LiteLLM without outside help?

Often yes, if the team already runs Kubernetes, manages GCP service accounts and has operated a PostgreSQL-backed service. LiteLLM's production guidance names PostgreSQL as the primary supported database and calls for Redis 7.0 or newer once more than one proxy instance runs, so the gateway itself needs database and cache operations skills. The harder parts are usually the security review, the key and budget model for many teams, and the verification that routes, quotas and logging behave as expected. Outside help is most useful for those areas or for a fixed-scope build you can hand over.

What does the work need from our GCP and security teams?

Your GCP team needs to decide which project and region the gateway calls, create a dedicated service account with only the Vertex AI permissions the approved models require, and confirm which Gemini and partner models are enabled in those projects. Your security team should review where the service account key or workload identity is stored, who can read the LiteLLM master key, and how the gateway's logs will capture prompts and responses. Confirm with your GCP team how the Vertex AI setup and the LiteLLM documentation describe current credential options before you choose one.

How long do setup and testing take?

No duration can be given here without knowing the scope. Setup time follows the number of projects, regions, model families, teams and authentication paths, and testing time follows how many routes, fallbacks and quota limits you need to prove. For a planning estimate, ask any provider to split the timeline into environment preparation, GCP access, gateway configuration, routing and budget tests, and a cutover window. Ask for a written list of what each phase delivers so you can check progress against it.

What recurring work follows the initial connection?

Once live, recurring work includes keeping the LiteLLM release on a supported line, applying database migrations, rotating service account credentials and the master key, reviewing quotas as Google changes model availability, and checking that budgets still match your provider bills. LiteLLM says it supports the four most recent stable minor versions for open source and Enterprise deployments, so plan upgrades inside that window. Budget a recurring owner for these tasks, or agree a retainer if you prefer outside support for them.

How does the LiteLLM license apply to a Vertex AI integration?

LiteLLM is dual licensed. Content under the enterprise/ directory uses the license in enterprise/LICENSE, and everything else is under the MIT license according to the project's LICENSE file. A Vertex AI route and the core proxy sit outside enterprise/, so they fall under MIT. Features that live in the enterprise directory, such as SSO beyond the free user limit, audit logs and secret manager integrations, require an Enterprise license. Have your legal team confirm which features you intend to use and read the license files directly before you commit.

Does the Vertex AI rename to Gemini Enterprise Agent Platform change how we connect?

LiteLLM states that Google's 2026 rename does not change the API host, model IDs, authentication or request shapes, so the vertex_ai/ route stays the same. Existing configuration, service account setup and model names should continue to work. Still, confirm the current model IDs and endpoint behavior against the LiteLLM Vertex AI documentation and your own test project before you move production traffic, since the name change is a product name and your tests are the evidence.

How DeployOpen scopes and delivers the Vertex AI integration

DeployOpen approaches LiteLLM with Google Vertex AI (Gemini Enterprise Agent Platform) as a fixed-scope engagement inside your own Google Cloud projects. We agree the service account design, project and region settings, routes and cost settings in writing, then build and test them in your environment and hand over the configuration and documentation your team needs to run it.

How we scope

  • Confirm which Gemini and partner models your teams need and which GCP projects and regions will host them.
  • Agree how service account credentials are issued, scoped and stored, and who owns key rotation.
  • Record the regional versus global endpoint decision, budgets, virtual key model access and logging requirements in the written scope.

How we build

  • Configure the vertex_ai/ routes in the LiteLLM proxy with project, location and credential settings kept out of plain config files.
  • Test routing, fallbacks, retries and budget enforcement against each approved model before any team receives a key.
  • Verify request logs and spend records against the Google Cloud billing data your finance team reviews.

How we hand over

  • Deliver the configuration as code, with a runbook covering credential rotation, region changes and model additions.
  • Document the data flow from callers through the gateway to Vertex AI so your security and compliance teams can review it.
  • Walk your platform and security engineers through the setup and record what is open for your own follow-up.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the fixed-scope delivery ends.
  • Plan LiteLLM version upgrades and retest the Vertex AI routes after each change to the Google endpoints or the gateway.
  • Ask for a written quote from the agreed scope, which covers which items are one-time and which recur.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.