Skip to content

chore(py/plugins/google-genai): retire the Imagen catalog - #6305

Open
hilariie wants to merge 2 commits into
mainfrom
chore/py-google-genai-retire-imagen
Open

hilariie wants to merge 2 commits into
mainfrom
chore/py-google-genai-retire-imagen

Conversation

@hilariie

@hilariie hilariie commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Closes #6176

Summary

Removes Imagen from the Python google-genai plugin. models/imagen.py is deleted along with ImagenVersion, KnownImagen, ImagenConfigSchema, ImagenModel, and the imagen_model constructors on GoogleAI and VertexAI. This is a breaking change to the package's public exports.

An imagen- id now fails closed on both plugins: ai.generate reports the model as not found instead of falling through to a Gemini text model, and every typed ref constructor rejects it with a hint pointing at gemini_image_model. Model discovery never registers imagen-* entries the API may still list.

The vertexai-imagen sample and its workspace entry are removed. The image flow in google-genai-media now targets googleai/gemini-2.5-flash-image. Removing the workspace member invalidated uv.lock, so uv lock re-emitted a few redundant environment markers in their current form; no dependency versions changed.

Also resolves the ImagenConfigSchema bullet of #6185. JS and Go still list the Imagen 4 ids and are out of scope here.

The new fail-closed and discovery tests were run against the parent commit's source and fail there.

Also, the Vertexai sample folder is still named vertexai-imagen. Renaming it would touch the root workspace config, the samples index, and possibly CI matrices, which is wider than this change, so I left it (can be a follow-up issue).

@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 removes the dedicated imagen model implementation, configuration schemas, and exports from the genkit-google-genai package. Imagen models are now classified as unsupported, and the system redirects users to use gemini_image_model() for image generation instead. Feedback on the changes suggests refactoring the unsupported model error handling in _model_refs.py to avoid redundant string formatting when suggesting the alternative image generation method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(py/plugins/google-genai): retire the Imagen catalog (Imagen is shut down)

1 participant