Skip to content

chore(genai): upgrade remaining Gen AI sample directories to google-genai 3.0.0 and Python 3.12 - #14811

Open
iennae wants to merge 2 commits into
mainfrom
chore/genai3-pin-and-python
Open

iennae wants to merge 2 commits into
mainfrom
chore/genai3-pin-and-python

Conversation

@iennae

@iennae iennae commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Description

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).

Part of the google-genai 3.0.0 and Python 3.12 update of the Gen AI samples, split into one PR per sample directory (small directories are grouped).

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

…enai 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).
@iennae
iennae requested review from a team as code owners November 14, 2026 01:00
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: people-and-planet-ai labels Nov 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the google-genai dependency to version 3.0.0 across multiple directories and updates the noxfile_config.py files to test Python 3.12 instead of Python 3.10. Feedback is provided to remove an outdated comment in people-and-planet-ai/image-classification/noxfile_config.py regarding Apache Beam's lack of support for Python 3.12, as Python 3.12 is now being tested.

…xfile_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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: people-and-planet-ai samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant