Skip to content

Support global endpoint for Vertex AI models #6811

Open
@zabealbe

Description

@zabealbe

Description

Currently, the SDK assumes that all Vertex AI models are hosted in region-specific endpoints like:

https://${region}-aiplatform.googleapis.com/v1/projects/${project}/locations/${region}/publishers/google

However, this pattern fails for the global region, which uses a different base URL:

https://aiplatform.googleapis.com/v1/...

Google’s official documentation confirms that some models are only available in the global region, especially on initial release. For example, gemini-2.5-flash-lite.

When attempting to use such models with GOOGLE_VERTEX_LOCATION="global", the following error occurs:

APICallError [AI_APICallError]: Publisher Model `projects/[PROJECT_ID]/locations/us-central1/publishers/google/models/gemini-2.5-flash-lite-preview-06-17` was not found...

The request is incorrectly sent to:

https://global-aiplatform.googleapis.com/...

Instead of:

https://aiplatform.googleapis.com/...

Related PR

fix: use appropriate domain for vertex global #6810

AI SDK Version

No response

Duplicates

#6644

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions