Skip to content

Vertex AI / Gemini Enterprise auth is required for enterprise deployments and provisioned capacity #8

@caiop91

Description

@caiop91

Summary

google-antigravity currently requires a Gemini API key (LocalAgentConfig(api_key=...) or GEMINI_API_KEY) and does not support Vertex AI / Gemini Enterprise authentication through service accounts, ADC, project, and location.

This is not just a missing convenience option. It prevents enterprise customers from using the provisioned Gemini capacity they have contracted through Google Cloud / Vertex AI.

Why this is a blocker

For enterprise deployments, Vertex AI / Gemini Enterprise is often the required path because customers need:

  • contracted provisioned capacity / throughput
  • IAM-based service account authentication
  • project-level billing, quota, and auditability
  • organization policy controls
  • production-grade security and secret management
  • predictable stability for critical workloads

Requiring AI Studio-style API keys makes the SDK unusable in environments where Gemini access must go through Vertex AI.

Enterprise impact

This blocks the use of Antigravity in serious enterprise settings.

Enterprise customers adopt Vertex AI precisely because they need stability, security, IAM governance, quota control, and contracted capacity. If a Google agent SDK only supports API keys and bypasses the Vertex/Gemini Enterprise path, it excludes the exact customers who are most likely to need this SDK in production.

Frankly, this also fits a recurring and frustrating pattern: Google launches powerful AI capabilities, but enterprise support paths lag behind or are treated as secondary. For customers paying for Google Cloud and Vertex AI capacity, that gap is hard to justify.

What I tested

Environment:

  • google-antigravity==0.1.0
  • Python 3.12 on macOS arm64
  • google-genai==2.4.0
  • Model: gemini-2.5-flash

A normal Vertex AI call using google-genai and service account credentials works:

from google import genai
from google.oauth2 import service_account

credentials = service_account.Credentials.from_service_account_info(
    service_account_info,
    scopes=["https://www.googleapis.com/auth/cloud-platform"],
)

client = genai.Client(
    vertexai=True,
    project="<gcp-project-id>",
    location="global",
    credentials=credentials,
)

response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="Reply exactly: OK",
)
print(response.text)
# OK

The same environment works with Antigravity only when using a Gemini API key:

from google.antigravity import Agent, LocalAgentConfig
from google.antigravity.types import BuiltinTools, CapabilitiesConfig

config = LocalAgentConfig(
    api_key="<gemini-api-key>",
    model="gemini-2.5-flash",
    capabilities=CapabilitiesConfig(enabled_tools=BuiltinTools.read_only()),
)

async with Agent(config) as agent:
    response = await agent.chat("Reply exactly: OK")
    print(await response.text())
# OK

But Antigravity does not appear to support Vertex/service-account auth. Passing a service account JSON as api_key fails, as expected:

AntigravityConnectionError: Agent execution terminated due to error.
("request failed (code 400): API key not valid. Please pass a valid API key.")

And omitting api_key while using only Vertex-related credentials fails before startup:

AntigravityValidationError: A Gemini API key is required. Set it via GeminiConfig(api_key=...) or the GEMINI_API_KEY environment variable.

Expected behavior

Please support Vertex AI / Gemini Enterprise authentication, for example:

  • LocalAgentConfig(vertexai=True, project=..., location=..., credentials=...)
  • GeminiConfig fields for Vertex/Gemini Enterprise auth
  • ADC / GOOGLE_APPLICATION_CREDENTIALS
  • google.auth.credentials.Credentials
  • parity with google-genai's Client(vertexai=True, project=..., location=..., credentials=...)

Actual behavior

The SDK requires a Gemini API key and does not provide a supported Vertex AI / Gemini Enterprise authentication path.

Workaround

Use a Gemini API key through LocalAgentConfig(api_key=...) or GEMINI_API_KEY.

This works technically, but it is not acceptable for enterprise deployments standardized on Vertex AI / Gemini Enterprise service account authentication and provisioned capacity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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