Skip to content

Feature Request: Add Google Vertex AI support with ADC authentication #9729

@TeigenZhang

Description

@TeigenZhang

Summary

Add support for Google Vertex AI as a model provider, using Application Default Credentials (ADC) for authentication.

Motivation

  • Users with GCP accounts and free credits ($300 trial) would like to use Vertex AI
  • Vertex AI offers features not available in Google AI Studio:
    • Grounding (search-augmented generation)
    • Higher rate limits
    • Context Caching for cost optimization
    • Enterprise SLA and support
  • ADC is the standard GCP authentication method and works seamlessly with gcloud auth application-default login

Proposed Implementation

Add a new provider configuration option, for example:

{
  "models": {
    "providers": {
      "vertex-ai": {
        "api": "google-vertex",
        "project": "my-gcp-project",
        "location": "us-central1",
        "models": [
          {
            "id": "gemini-2.0-flash",
            "name": "Vertex Gemini 2.0 Flash"
          }
        ]
      }
    }
  }
}

Authentication should use ADC (via google-auth-library or similar), reading credentials from:

  1. GOOGLE_APPLICATION_CREDENTIALS environment variable
  2. Default credential chain (~/.config/gcloud/application_default_credentials.json)

Additional Context

  • Current google-generative-ai API works great for AI Studio, but requires API keys
  • Vertex AI uses a different endpoint format: https://{location}-aiplatform.googleapis.com/v1/projects/{project}/locations/{location}/publishers/google/models/{model}
  • The Gemini models available on Vertex AI are the same as AI Studio, just with different auth and endpoints

Thanks for considering!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions