Point the image default back at Imagen, which is what the code speaks - #7
Merged
Conversation
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.
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.
Fixes a regression I shipped in v0.15.2.
generateImage()builds an Imagen-shaped request:instances/parametersposted to:predict, and parsespredictions[].bytesBase64Encodedback. v0.15.2 repointed its default togemini-3.1-flash-image, which is a Gemini model usinggenerateContent, 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.