-
Notifications
You must be signed in to change notification settings - Fork 972
Set 'us-central1' by default on GoogleProvider
#2031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Docs Preview
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested, but this looks like it would solve the missing location caused by the swap from GeminiModel to GoogleModel
@@ -104,7 +104,7 @@ def __init__( | |||
self._client = genai.Client( | |||
vertexai=vertexai, | |||
project=project or os.environ.get('GOOGLE_CLOUD_PROJECT'), | |||
location=location or os.environ.get('GOOGLE_CLOUD_LOCATION'), | |||
location=location or os.environ.get('GOOGLE_CLOUD_LOCATION') or 'us-central1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
location=location or os.environ.get('GOOGLE_CLOUD_LOCATION') or 'us-central1', | |
location=location or os.environ.get('GOOGLE_CLOUD_LOCATION') or 'global', |
I think that's better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's a perfect value according to the docs. Select quotes:
- "Selecting a global endpoint for your requests can improve overall availability while reducing resource exhausted (429) errors"
- Usage of the global endpoint is supported for the following Google models... [gemini 2.0 and 2.5]
- For some models, Google also offers a global endpoint (Preview)
Currently us-central1
supports the most models by far of any region including global, but not all of them. us-central1
has all google models but is missing some Anthropic partner models, which use us-east5
instead. global
has fewer models but higher availability.
Google is not making like easy!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh!
There was an error while loading. Please reload this page.