Skip to content

GCP Vertex AI provider doesn't support global endpoint for Gemini 3 models #6186

@clouatre

Description

@clouatre

Describe the bug

Gemini 3 models (gemini-3-pro-preview, gemini-3-flash-preview) require the global endpoint on Vertex AI. Setting GCP_LOCATION=global does not work because the provider constructs an invalid URL.

In crates/goose/src/providers/gcpvertexai.rs:

let host = format!("https://{}-aiplatform.googleapis.com", location);

This produces https://global-aiplatform.googleapis.com instead of https://aiplatform.googleapis.com.


To Reproduce

  1. Set config:
    GOOSE_PROVIDER: gcp_vertex_ai
    GOOSE_MODEL: gemini-3-pro-preview
    GCP_LOCATION: global
  2. Run goose session
  3. Send any message
  4. Request fails

Expected behavior

When GCP_LOCATION=global, use endpoint https://aiplatform.googleapis.com with locations/global in the path.


Please provide the following information

  • OS & Arch: macOS 26.1 arm64
  • Interface: CLI
  • Version: 1.17.0
  • Extensions enabled: Developer Tools
  • Provider & Model: GCP Vertex AI – gemini-3-pro-preview

Additional context

Regional endpoint returns 404:

curl -X POST "https://us-central1-aiplatform.googleapis.com/.../gemini-3-pro-preview:generateContent"
# 404 NOT_FOUND

Global endpoint works:

curl -X POST "https://aiplatform.googleapis.com/v1/projects/{project}/locations/global/publishers/google/models/gemini-3-pro-preview:generateContent"
# Success

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions