Skip to content

[Platform] Derive VertexAI API host from location for regional and data-residency endpoints#2284

Open
rserry wants to merge 1 commit into
symfony:mainfrom
rserry:feature/vertexai-regional-endpoints
Open

[Platform] Derive VertexAI API host from location for regional and data-residency endpoints#2284
rserry wants to merge 1 commit into
symfony:mainfrom
rserry:feature/vertexai-regional-endpoints

Conversation

@rserry

@rserry rserry commented Jul 8, 2026

Copy link
Copy Markdown
Q A
Bug fix? no
New feature? yes
Docs? yes
Issues Fix #2283
License MIT

The VertexAI bridge hardcoded aiplatform.googleapis.com for every request, so
regional and data-residency (jurisdictional) deployments could not be reached —
a blocker for anyone with data-residency requirements (e.g. EU healthcare/GDPR).

This derives the API host from the location already passed to the factory,
via a small RegionAwareTrait::resolveHost() helper shared by the Gemini and
Embeddings model clients:

  • null / globalaiplatform.googleapis.com (unchanged)
  • eu / usaiplatform.eu.rep.googleapis.com / aiplatform.us.rep.googleapis.com
  • any region, e.g. europe-west1europe-west1-aiplatform.googleapis.com
// Regional endpoint
Factory::createPlatform(location: 'europe-west1', projectId: 'my-project');

// EU data-residency endpoint
Factory::createPlatform(location: 'eu', projectId: 'my-project');

@carsonbot carsonbot added Status: Needs Review Feature New feature Platform Issues & PRs about the AI Platform component labels Jul 8, 2026

@chr-hertel chr-hertel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rserry, thanks for raising this issue and jumping on providing a solution - pretty much appreciated!

I made some minor comments - i don't use Vertex myself, but also noted this change now with the examples and I think we should consider this a breaking change => meaning to add a note about it in UPGRADE.md

Image

Comment on lines +14 to +29
Regional and Data-Residency Endpoints
-------------------------------------

The API host is derived from the `location` passed to the factory:

* `null` or `global` uses the global endpoint `aiplatform.googleapis.com`.
* A region such as `europe-west1` uses the matching regional endpoint
`europe-west1-aiplatform.googleapis.com`.
* The multi-region data-residency (jurisdictional) values `eu` and `us` use
`aiplatform.eu.rep.googleapis.com` and `aiplatform.us.rep.googleapis.com`
respectively.

See [Vertex AI locations](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations)
and [data residency](https://cloud.google.com/vertex-ai/generative-ai/docs/data-residency)
for the list of supported values.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this section to docs/components/platform/vertexai.rst instead - we keep the README tidy, but the rst files are deployed to symfony.com docs

0.11
----

* Derive the API host from the configured `location` so regional (e.g. `europe-west1`) and data-residency (`eu`, `us`) endpoints are used; `null`/`global` keep the existing `aiplatform.googleapis.com` host

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep it short:

Suggested change
* Derive the API host from the configured `location` so regional (e.g. `europe-west1`) and data-residency (`eu`, `us`) endpoints are used; `null`/`global` keep the existing `aiplatform.googleapis.com` host
* Derive the API host from the configured `location` to support regional and and data-residency endpoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature Platform Issues & PRs about the AI Platform component Status: Needs Work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Platform][VertexAI] Support regional and multi-region (data-residency) endpoints

3 participants