From 7fe02c412c190153eeea2eddd08cc4a2e0ffefd5 Mon Sep 17 00:00:00 2001 From: Jennifer Davis Date: Sat, 14 Nov 2026 00:57:43 +0000 Subject: [PATCH 1/2] chore(genai): upgrade remaining Gen AI sample directories to google-genai 3.0.0 and Python 3.12 These directories pinned google-genai 1.7.0 to 2.29.0 and tested on Python 3.10 (end of life) and 3.14. They need no sample code changes. Changes: - Directories: image_generation, video_generation, live, model_optimizer, template_folder, model_garden/anthropic, people-and-planet-ai/image-classification. - Pin `google-genai==3.0.0` and test on Python 3.12 (3.14 unchanged). genai/live already tested 3.12. Testing: Live tests ran against a Google Cloud test project on Python 3.12. Every directory with a failure was also run with the pins from `main`: no test that passes on `main` fails with these changes. Remaining failures are listed below and also fail on `main`. - Pass: image_generation 7/7, people-and-planet-ai/image-classification 5/5, template_folder 1/1. - video_generation 3/8 (on `main`, 0/8: 1.43.0 doesn't support `GOOGLE_GENAI_USE_ENTERPRISE`). The other 5 use Veo models that aren't available in the test project. - live 5/15: the other 10 fail the same way on `main` (the native-audio model rejects text output, model access, or `simpleaudio` is missing). Moving to `gemini-3.8-live` needs sample changes and is a follow-up before `gemini-live-2.5-flash-native-audio` retires on December 13, 2026. - model_optimizer 0/1 and model_garden/anthropic 0/2 fail the same way on `main` (the model isn't available or is retired, and the BigQuery test data is in another project). --- genai/image_generation/noxfile_config.py | 2 +- genai/image_generation/requirements.txt | 2 +- genai/live/requirements.txt | 2 +- genai/model_optimizer/noxfile_config.py | 2 +- genai/model_optimizer/requirements.txt | 2 +- genai/template_folder/noxfile_config.py | 2 +- genai/template_folder/requirements.txt | 2 +- genai/video_generation/noxfile_config.py | 2 +- genai/video_generation/requirements.txt | 2 +- model_garden/anthropic/noxfile_config.py | 2 +- model_garden/anthropic/requirements.txt | 2 +- people-and-planet-ai/image-classification/noxfile_config.py | 2 +- people-and-planet-ai/image-classification/requirements.txt | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/genai/image_generation/noxfile_config.py b/genai/image_generation/noxfile_config.py index 0973c8621c7..f4391d5680d 100644 --- a/genai/image_generation/noxfile_config.py +++ b/genai/image_generation/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["3.8", "3.9", "3.11", "3.12", "3.13"], + "ignored_versions": ["3.8", "3.9", "3.10", "3.11", "3.13"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/genai/image_generation/requirements.txt b/genai/image_generation/requirements.txt index 1af6c711b57..7b7f2db0446 100644 --- a/genai/image_generation/requirements.txt +++ b/genai/image_generation/requirements.txt @@ -1,2 +1,2 @@ -google-genai==2.29.0 +google-genai==3.0.0 pillow==12.3.0; python_version >= "3.10" diff --git a/genai/live/requirements.txt b/genai/live/requirements.txt index b20a2df28a8..74682a7838c 100644 --- a/genai/live/requirements.txt +++ b/genai/live/requirements.txt @@ -1,4 +1,4 @@ -google-genai==2.29.0 +google-genai==3.0.0 scipy==1.18.1 websockets==15.0.1 numpy==2.5.3 diff --git a/genai/model_optimizer/noxfile_config.py b/genai/model_optimizer/noxfile_config.py index 0973c8621c7..f4391d5680d 100644 --- a/genai/model_optimizer/noxfile_config.py +++ b/genai/model_optimizer/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["3.8", "3.9", "3.11", "3.12", "3.13"], + "ignored_versions": ["3.8", "3.9", "3.10", "3.11", "3.13"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/genai/model_optimizer/requirements.txt b/genai/model_optimizer/requirements.txt index ad433f48578..dc7647db760 100644 --- a/genai/model_optimizer/requirements.txt +++ b/genai/model_optimizer/requirements.txt @@ -1 +1 @@ -google-genai==2.29.0 +google-genai==3.0.0 diff --git a/genai/template_folder/noxfile_config.py b/genai/template_folder/noxfile_config.py index 0973c8621c7..f4391d5680d 100644 --- a/genai/template_folder/noxfile_config.py +++ b/genai/template_folder/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["3.8", "3.9", "3.11", "3.12", "3.13"], + "ignored_versions": ["3.8", "3.9", "3.10", "3.11", "3.13"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/genai/template_folder/requirements.txt b/genai/template_folder/requirements.txt index ad433f48578..dc7647db760 100644 --- a/genai/template_folder/requirements.txt +++ b/genai/template_folder/requirements.txt @@ -1 +1 @@ -google-genai==2.29.0 +google-genai==3.0.0 diff --git a/genai/video_generation/noxfile_config.py b/genai/video_generation/noxfile_config.py index 0973c8621c7..f4391d5680d 100644 --- a/genai/video_generation/noxfile_config.py +++ b/genai/video_generation/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["3.8", "3.9", "3.11", "3.12", "3.13"], + "ignored_versions": ["3.8", "3.9", "3.10", "3.11", "3.13"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/genai/video_generation/requirements.txt b/genai/video_generation/requirements.txt index b83c25fae61..dc7647db760 100644 --- a/genai/video_generation/requirements.txt +++ b/genai/video_generation/requirements.txt @@ -1 +1 @@ -google-genai==1.43.0 +google-genai==3.0.0 diff --git a/model_garden/anthropic/noxfile_config.py b/model_garden/anthropic/noxfile_config.py index 0973c8621c7..f4391d5680d 100644 --- a/model_garden/anthropic/noxfile_config.py +++ b/model_garden/anthropic/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["3.8", "3.9", "3.11", "3.12", "3.13"], + "ignored_versions": ["3.8", "3.9", "3.10", "3.11", "3.13"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/model_garden/anthropic/requirements.txt b/model_garden/anthropic/requirements.txt index 52f70d3580a..b6311a75cfe 100644 --- a/model_garden/anthropic/requirements.txt +++ b/model_garden/anthropic/requirements.txt @@ -1 +1 @@ -google-genai==1.7.0 \ No newline at end of file +google-genai==3.0.0 \ No newline at end of file diff --git a/people-and-planet-ai/image-classification/noxfile_config.py b/people-and-planet-ai/image-classification/noxfile_config.py index df28cd818d6..745758cf17f 100644 --- a/people-and-planet-ai/image-classification/noxfile_config.py +++ b/people-and-planet-ai/image-classification/noxfile_config.py @@ -23,7 +23,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. # NOTE: Apache Beam does not currently support Python 3.12. - "ignored_versions": ["3.8", "3.9", "3.11", "3.12", "3.13"], + "ignored_versions": ["3.8", "3.9", "3.10", "3.11", "3.13"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/people-and-planet-ai/image-classification/requirements.txt b/people-and-planet-ai/image-classification/requirements.txt index 1db18250480..a158d179941 100644 --- a/people-and-planet-ai/image-classification/requirements.txt +++ b/people-and-planet-ai/image-classification/requirements.txt @@ -1,5 +1,5 @@ apache-beam[gcp]==2.77.0 -google-genai==2.29.0 +google-genai==3.0.0 pillow==12.3.0 pydantic==2.14.1 requests==2.34.2 From 7aaae73b28bd1cbc450394c6c8c531e27570262f Mon Sep 17 00:00:00 2001 From: Jennifer Davis Date: Sat, 14 Nov 2026 02:01:09 +0000 Subject: [PATCH 2/2] chore(people-and-planet-ai): remove outdated Python 3.12 note from noxfile_config The image-classification noxfile_config.py said Apache Beam doesn't support Python 3.12, but this directory now tests on Python 3.12 and its tests pass there (5/5 live). Remove the outdated note so the test configuration isn't misleading. --- people-and-planet-ai/image-classification/noxfile_config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/people-and-planet-ai/image-classification/noxfile_config.py b/people-and-planet-ai/image-classification/noxfile_config.py index 745758cf17f..411ccbed39d 100644 --- a/people-and-planet-ai/image-classification/noxfile_config.py +++ b/people-and-planet-ai/image-classification/noxfile_config.py @@ -22,7 +22,6 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - # NOTE: Apache Beam does not currently support Python 3.12. "ignored_versions": ["3.8", "3.9", "3.10", "3.11", "3.13"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them