diff --git a/genai/controlled_generation/ctrlgen_with_class_schema.py b/genai/controlled_generation/ctrlgen_with_class_schema.py index 51effae1c5..3ed506a91a 100644 --- a/genai/controlled_generation/ctrlgen_with_class_schema.py +++ b/genai/controlled_generation/ctrlgen_with_class_schema.py @@ -25,7 +25,7 @@ class Recipe(BaseModel): client = genai.Client(http_options=HttpOptions(api_version="v1")) response = client.models.generate_content( - model="gemini-3.5-flash", + model="gemini-3.8-flash", contents="List a few popular cookie recipes.", config=GenerateContentConfig( response_mime_type="application/json", diff --git a/genai/controlled_generation/requirements-test.txt b/genai/controlled_generation/requirements-test.txt index baa23bf9c3..63dd92c496 100644 --- a/genai/controlled_generation/requirements-test.txt +++ b/genai/controlled_generation/requirements-test.txt @@ -1,4 +1,4 @@ backoff==2.2.1 google-api-core==2.19.0 pytest==9.0.3; python_version >= "3.10" -pytest-asyncio==0.23.6 +pytest-asyncio==1.4.0 diff --git a/genai/count_tokens/counttoken_with_txt.py b/genai/count_tokens/counttoken_with_txt.py index 7eb37a8d2a..f3a885314c 100644 --- a/genai/count_tokens/counttoken_with_txt.py +++ b/genai/count_tokens/counttoken_with_txt.py @@ -20,7 +20,7 @@ def count_tokens() -> int: client = genai.Client(http_options=HttpOptions(api_version="v1")) response = client.models.count_tokens( - model="gemini-3.5-flash", + model="gemini-3.8-flash", contents="What's the highest mountain in Africa?", ) print(response) diff --git a/genai/count_tokens/requirements-test.txt b/genai/count_tokens/requirements-test.txt index baa23bf9c3..63dd92c496 100644 --- a/genai/count_tokens/requirements-test.txt +++ b/genai/count_tokens/requirements-test.txt @@ -1,4 +1,4 @@ backoff==2.2.1 google-api-core==2.19.0 pytest==9.0.3; python_version >= "3.10" -pytest-asyncio==0.23.6 +pytest-asyncio==1.4.0 diff --git a/genai/model_optimizer/requirements-test.txt b/genai/model_optimizer/requirements-test.txt index baa23bf9c3..63dd92c496 100644 --- a/genai/model_optimizer/requirements-test.txt +++ b/genai/model_optimizer/requirements-test.txt @@ -1,4 +1,4 @@ backoff==2.2.1 google-api-core==2.19.0 pytest==9.0.3; python_version >= "3.10" -pytest-asyncio==0.23.6 +pytest-asyncio==1.4.0 diff --git a/genai/template_folder/requirements-test.txt b/genai/template_folder/requirements-test.txt index baa23bf9c3..63dd92c496 100644 --- a/genai/template_folder/requirements-test.txt +++ b/genai/template_folder/requirements-test.txt @@ -1,4 +1,4 @@ backoff==2.2.1 google-api-core==2.19.0 pytest==9.0.3; python_version >= "3.10" -pytest-asyncio==0.23.6 +pytest-asyncio==1.4.0 diff --git a/genai/text_generation/textgen_chat_with_txt.py b/genai/text_generation/textgen_chat_with_txt.py index 36e13e81e5..6e8859b766 100644 --- a/genai/text_generation/textgen_chat_with_txt.py +++ b/genai/text_generation/textgen_chat_with_txt.py @@ -20,7 +20,7 @@ def generate_content() -> str: client = genai.Client(http_options=HttpOptions(api_version="v1")) chat_session = client.chats.create( - model="gemini-3.5-flash", + model="gemini-3.8-flash", history=[ UserContent(parts=[Part(text="Hello")]), ModelContent( diff --git a/genai/text_generation/textgen_with_txt.py b/genai/text_generation/textgen_with_txt.py index 4825aac921..3273635f08 100644 --- a/genai/text_generation/textgen_with_txt.py +++ b/genai/text_generation/textgen_with_txt.py @@ -20,7 +20,7 @@ def generate_content() -> str: client = genai.Client(http_options=HttpOptions(api_version="v1")) response = client.models.generate_content( - model="gemini-3.5-flash", + model="gemini-3.8-flash", contents="How does AI work?", ) print(response.text) diff --git a/genai/thinking/requirements-test.txt b/genai/thinking/requirements-test.txt index baa23bf9c3..63dd92c496 100644 --- a/genai/thinking/requirements-test.txt +++ b/genai/thinking/requirements-test.txt @@ -1,4 +1,4 @@ backoff==2.2.1 google-api-core==2.19.0 pytest==9.0.3; python_version >= "3.10" -pytest-asyncio==0.23.6 +pytest-asyncio==1.4.0 diff --git a/genai/tools/requirements-test.txt b/genai/tools/requirements-test.txt index baa23bf9c3..63dd92c496 100644 --- a/genai/tools/requirements-test.txt +++ b/genai/tools/requirements-test.txt @@ -1,4 +1,4 @@ backoff==2.2.1 google-api-core==2.19.0 pytest==9.0.3; python_version >= "3.10" -pytest-asyncio==0.23.6 +pytest-asyncio==1.4.0 diff --git a/genai/tools/requirements.txt b/genai/tools/requirements.txt index b82955a551..c1de7bb196 100644 --- a/genai/tools/requirements.txt +++ b/genai/tools/requirements.txt @@ -1,3 +1,3 @@ -google-genai==1.45.0 +google-genai==2.29.0 # PIl is required for tools_code_execution_with_txt_img.py pillow==12.3.0; python_version >= "3.10" diff --git a/genai/tools/test_tools_examples.py b/genai/tools/test_tools_examples.py index c368dba92b..26dd3e5d31 100644 --- a/genai/tools/test_tools_examples.py +++ b/genai/tools/test_tools_examples.py @@ -43,7 +43,7 @@ import tools_vais_with_txt os.environ["GOOGLE_GENAI_USE_ENTERPRISE"] = "True" -os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1" +os.environ["GOOGLE_CLOUD_LOCATION"] = "global" # The project name is included in the CICD pipeline # os.environ['GOOGLE_CLOUD_PROJECT'] = "add-your-project-name" @@ -144,4 +144,3 @@ def test_tools_interactions_urlcontext_with_txt() -> None: def test_tools_interactions_google_search_and_urlcontext_with_txt() -> None: assert tools_interactions_google_search_and_urlcontext_with_txt.create_interaction() - diff --git a/genai/tools/tools_func_def_with_txt.py b/genai/tools/tools_func_def_with_txt.py index 98581a43fc..90a0dda58c 100644 --- a/genai/tools/tools_func_def_with_txt.py +++ b/genai/tools/tools_func_def_with_txt.py @@ -34,14 +34,13 @@ def get_current_weather(location: str) -> str: return weather_map.get(location, "unknown") client = genai.Client(http_options=HttpOptions(api_version="v1")) - model_id = "gemini-3.5-flash" + model_id = "gemini-3.8-flash" response = client.models.generate_content( model=model_id, contents="What is the weather like in Boston?", config=GenerateContentConfig( tools=[get_current_weather], - temperature=0, ), )