Skip to content

Commit 452cee5

Browse files
committed
feat(genai): update to use global endpoint as location
1 parent 6d35b0d commit 452cee5

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

genai/bounding_box/test_bounding_box_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import boundingbox_with_txt_img
2222

2323
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "True"
24-
os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1"
24+
os.environ["GOOGLE_CLOUD_LOCATION"] = "global" # "us-central1"
2525
# The project name is included in the CICD pipeline
2626
# os.environ['GOOGLE_CLOUD_PROJECT'] = "add-your-project-name"
2727

genai/controlled_generation/test_controlled_generation_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import ctrlgen_with_resp_schema
2727

2828
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "True"
29-
os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1"
29+
os.environ["GOOGLE_CLOUD_LOCATION"] = "global" # "us-central1"
3030
# The project name is included in the CICD pipeline
3131
# os.environ['GOOGLE_CLOUD_PROJECT'] = "add-your-project-name"
3232

genai/count_tokens/test_count_tokens_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import counttoken_with_txt_vid
2525

2626
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "True"
27-
os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1"
27+
os.environ["GOOGLE_CLOUD_LOCATION"] = "global" # "us-central1"
2828
# The project name is included in the CICD pipeline
2929
# os.environ['GOOGLE_CLOUD_PROJECT'] = "add-your-project-name"
3030

genai/express_mode/test_express_mode_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_api_key_example(mock_genai_client: MagicMock) -> None:
4040

4141
mock_genai_client.assert_called_once_with(vertexai=True, api_key="YOUR_API_KEY")
4242
mock_genai_client.return_value.models.generate_content.assert_called_once_with(
43-
model="gemini-2.0-flash-001",
43+
model="gemini-2.5-flash-preview-05-20",
4444
contents="Explain bubble sort to me.",
4545
)
4646
assert response == "This is a mocked bubble sort explanation."

genai/safety/test_safety_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "True"
25-
os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1"
25+
os.environ["GOOGLE_CLOUD_LOCATION"] = "global" # "us-central1"
2626
# The project name is included in the CICD pipeline
2727
# os.environ['GOOGLE_CLOUD_PROJECT'] = "add-your-project-name"
2828

genai/template_folder/test_templatefolder_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
1616
import templatefolder_with_txt
1717

1818
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "True"
19-
os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1"
19+
os.environ["GOOGLE_CLOUD_LOCATION"] = "global" # "us-central1"
2020
# The project name is included in the CICD pipeline
2121
# os.environ['GOOGLE_CLOUD_PROJECT'] = "add-your-project-name"
2222

genai/text_generation/test_text_generation_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import thinking_textgen_with_txt
4040

4141
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "True"
42-
os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1"
42+
os.environ["GOOGLE_CLOUD_LOCATION"] = "global" # "us-central1"
4343
# The project name is included in the CICD pipeline
4444
# os.environ['GOOGLE_CLOUD_PROJECT'] = "add-your-project-name"
4545

genai/thinking/test_thinking_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
1818
import thinking_with_txt
1919

2020
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "True"
21-
os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1"
21+
os.environ["GOOGLE_CLOUD_LOCATION"] = "global" # "us-central1"
2222
# The project name is included in the CICD pipeline
2323
# os.environ['GOOGLE_CLOUD_PROJECT'] = "add-your-project-name"
2424

0 commit comments

Comments
 (0)