Vertex AI

Configure Google Cloud Vertex AI as an LLM provider in agentgateway.

Authentication

Before you can use Vertex AI as an LLM provider, you must authenticate by using Google Cloud’s Application Default Credentials. Choose from one of the three methods:

  • GOOGLE_APPLICATION_CREDENTIALS
  • application_default_credentials.json
  • metadata server

Configuration

Review the following example configuration.
binds:
- port: 3000
  listeners:
  - routes:
    - backends:
      - ai:
          name: vertex
          provider:
            vertex:
              projectId: my-project-id
               # Optional: defaults to 'global'
              region: us-west2
              # Optional; overrides the model in requests
              model: google/gemini-2.5-flash-lite-preview-06-17
Review the following example configuration.
Setting Description
ai.name The name of the LLM provider for this AI backend.
vertex.projectId The Google Cloud project ID.
vertex.region The Google Cloud region. Defaults to global.
vertex.model Optionally set the model to use for requests. If set, any models in the request are overwritten. If not set, the request must include the model to use.