Skip to content

stop hardcoding us-central1 as vertex ai default location#8313

Open
Mr-Neutr0n wants to merge 2 commits intomarimo-team:mainfrom
Mr-Neutr0n:fix/vertex-ai-location-default
Open

stop hardcoding us-central1 as vertex ai default location#8313
Mr-Neutr0n wants to merge 2 commits intomarimo-team:mainfrom
Mr-Neutr0n:fix/vertex-ai-location-default

Conversation

@Mr-Neutr0n
Copy link

When using Vertex AI without setting GOOGLE_CLOUD_LOCATION, marimo hardcodes us-central1 as the fallback. This silently routes requests to a region that may be blocked by organization policies (like region restriction constraints), giving users a cryptic error with no indication of what went wrong.

This removes the hardcoded default and lets pydantic-ai handle the fallback itself. Also adds a warning log when the env var isn't set, so users in restricted environments actually know they need to configure it.

Fixes #7899

remove the hardcoded fallback to us-central1 for GOOGLE_CLOUD_LOCATION
and let pydantic-ai handle its own default. log a warning when the env
var isn't set so users in restricted regions know what's going on
instead of getting a cryptic permission error.

fixes marimo-team#7899
@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Feb 14, 2026 5:12am

Request Review

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Collaborator

@dmadisetti dmadisetti left a comment

Choose a reason for hiding this comment

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

Minor comment! Might also be better as an info over a warning

project = os.getenv("GOOGLE_CLOUD_PROJECT")
location = os.getenv("GOOGLE_CLOUD_LOCATION", "us-central1")
location = os.getenv("GOOGLE_CLOUD_LOCATION") or None
if location is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good callout, but this doesn't actually re-set location

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nvm, saw the thread, but would be worth mentioning in a comment that upstream will default to us-central

Copy link
Author

Choose a reason for hiding this comment

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

Good call, switched it to info and added a comment noting the upstream default. Thanks for the review!

@dmadisetti dmadisetti added the bug Something isn't working label Feb 14, 2026
@Light2Dark
Copy link
Contributor

@Mr-Neutr0n , thanks! Could you sign the CLA so we can merge this?

Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.

I have read the CLA Document and I hereby sign the CLA

You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@Mr-Neutr0n
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Vertex AI] Avoid silent default to 'us-central1' for GOOGLE_CLOUD_LOCATION to support restricted environments

3 participants