feat(py/plugins/google-genai): Add Imagen 4 models on GoogleAI#5180
Draft
cabljac wants to merge 3 commits into
Draft
feat(py/plugins/google-genai): Add Imagen 4 models on GoogleAI#5180cabljac wants to merge 3 commits into
cabljac wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds support for Imagen 4 models to the Google GenAI plugin and ensures their availability by hardcoding known versions to supplement SDK discovery. It also introduces provider-specific model info helpers for Vertex AI and Google AI. Review feedback identifies a risk of incorrect labeling due to shared state in the SUPPORTED_MODELS dictionary and suggests simplifying the model list union logic to improve maintainability and reduce duplication.
a130c96 to
eda4a5e
Compare
Registers imagen-4.0-generate-001, imagen-4.0-fast-generate-001, and imagen-4.0-ultra-generate-001 on the GoogleAI (Gemini API) backend. - Adds the three versions to ImagenVersion and SUPPORTED_MODELS with "Google AI - Imagen 4*" labels. - Adds a googleai_image_model_info helper so GoogleAI Imagen models no longer fall back to a "Vertex AI" label. - Unions the hardcoded GOOGLEAI_KNOWN_IMAGEN_MODELS list into the GoogleAI plugin's imagen enumeration so Init and list_actions expose the models even if client.models.list() doesn't yet surface them. - Existing parametrised Imagen test automatically covers the three new versions via iteration over ImagenVersion.
eda4a5e to
79ffbfe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the three Imagen 4 models on the GoogleAI (Gemini API) backend:
imagen-4.0-generate-001imagen-4.0-fast-generate-001imagen-4.0-ultra-generate-001Mirrors JS
js/plugins/google-genai/src/googleai/imagen.tsKNOWN_MODELS. Also adds agoogleai_image_model_infohelper so GoogleAI imagen models no longer carry a "Vertex AI" label, and unions a hardcoded known-model list into the plugin's imagen enumeration so the models are visible inInit/list_actionseven when the SDK'sclient.models.list()doesn't surface them.Testing