feat(py/plugins/google-genai): finish_message for image models and effective config echo - #5859
feat(py/plugins/google-genai): finish_message for image models and effective config echo#5859cabljac wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the deprecated gemini-2.5-flash-image-preview model, introduces a mechanism to track and return the effective configuration (normalized to snake_case and including injected modalities) on the response's request copy, and improves handling of empty or blocked image generation responses by mapping new finish reasons (NO_IMAGE, IMAGE_OTHER) and providing descriptive finish messages. The reviewer suggests fully removing the unused GEMINI_2_5_FLASH_IMAGE_PREVIEW enum members and constants, which were left behind after removing the model from docstrings and registration.
| | `gemini-3-pro-image-preview` | Gemini 3 Pro Image Preview | Supported | | ||
| | `gemini-2.5-flash-image-preview` | Gemini 2.5 Flash Image Preview | Supported | | ||
| | `gemini-2.5-flash-image` | Gemini 2.5 Flash Image | Supported | |
There was a problem hiding this comment.
While the docstrings for VertexAIGeminiVersion and GoogleAIGeminiVersion have been updated to remove gemini-2.5-flash-image-preview, the actual enum members GEMINI_2_5_FLASH_IMAGE_PREVIEW are still defined in both enum classes, and the constant GEMINI_2_5_FLASH_IMAGE_PREVIEW remains defined in the file. To fully retire this model version, please remove these unused enum members and constants.
9a2c0ba to
0f97e7b
Compare
c0b14c3 to
2a2ad94
Compare
…fective config echo Gemini slice extracted from #5806: normalizes finish reasons (NO_IMAGE, IMAGE_OTHER), synthesizes finish_message when image models return no media so empty results are not silent successes, propagates finish_message onto candidates, echoes the normalized effective config on response.request for debugging, and drops the retired gemini-2.5-flash-image-preview registration. Co-authored-by: Jeff Huang <huangjeff@google.com>
0f97e7b to
c9df52c
Compare
Parallel slice of the #5806 split (based on #5854, independent of the Interactions chain): normalizes finish reasons (NO_IMAGE, IMAGE_OTHER), synthesizes finish_message when image models return no media so empty results are not silent successes, propagates finish_message onto candidates, echoes the normalized effective config on response.request, and drops the retired gemini-2.5-flash-image-preview registration.
Part of the stack splitting #5806; recombined it reproduces that PR byte-for-byte. Co-authored with @huangjeff5.
Breaking changes
gemini-2.5-flash-image-previewis no longer registered as a model (theGEMINI_2_5_FLASH_IMAGE_PREVIEWenum members remain, but the model name stops resolving). Usegemini-2.5-flash-image.