Skip to content

Point the image default back at Imagen, which is what the code speaks - #7

Merged
MarcelloDuarte merged 1 commit into
mainfrom
revert-image-default
Jul 31, 2026
Merged

Point the image default back at Imagen, which is what the code speaks#7
MarcelloDuarte merged 1 commit into
mainfrom
revert-image-default

Conversation

@MarcelloDuarte

Copy link
Copy Markdown
Contributor

Fixes a regression I shipped in v0.15.2.

generateImage() builds an Imagen-shaped request: instances/parameters posted to :predict, and parses predictions[].bytesBase64Encoded back. v0.15.2 repointed its default to gemini-3.1-flash-image, which is a Gemini model using generateContent, so the default did not match the code around it.

Reverted to imagen-4.0-fast-generate-001, with a comment on the line explaining why it cannot simply be swapped.

This is a stay of execution, not a fix. Imagen shuts down 17 August 2026, so the Gemini image path has to be implemented properly, as a new request shape and response parser, before then. Doing that is now the only thing standing between this library and having no working image generation at all.

v0.15.2 repointed generateImage to gemini-3.1-flash-image without checking the
wire format. The method builds an Imagen-shaped request, instances/parameters
posted to :predict, and the Gemini image models do not speak that endpoint, so
the default it shipped was very likely broken.

Back to imagen-4.0-fast until the Gemini image path is actually implemented.
That path is needed regardless: Imagen shuts down on 17 August 2026.
@MarcelloDuarte
MarcelloDuarte merged commit 3295d1c into main Jul 31, 2026
6 checks passed
@MarcelloDuarte
MarcelloDuarte deleted the revert-image-default branch July 31, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant