HI,
I noticed today that gemini-2.5-flash-image is giving me finishReason “IMAGE_OTHER” on basically every call. I tried removing all instructions and input prompts, but that didn’t change a thing. Tried with different input images, but still the same result.
Doing the same thing with “gemini-3-pro-image-preview” (NB Pro) works perfectly fine.
I’m using the key from Google AI Studio to call it with the API.
Anyone else experiencing this or know how to go around it?
Cheers
Here is the code snippet (removed the extra stuff):
const uploadedFiles = await Promise.all(
images.map(async (img) =>
geminiAI.files.upload({
file: img.blob,
config: { mimeType: img.mimeType },
}),
),
);
const contents = createUserContent([
prompt,
...uploadedFiles.map((file) => createPartFromUri(file.uri!, file.mimeType!)),
\]);
const response = await geminiAI.models.generateContent({
model: “gemini-2.5-flash-image”,
contents: contents,
config: {
generationConfig: {
temperature: 0.2,
},
responseModalities: \[Modality.IMAGE\],
systemInstruction: “Edit input images for Ecommerce product photography.”,
imageConfig: {
aspectRatio: “1:1”,
imageSize: “1K”,
},
},
});
Hi Rolands!
Thank you so much for sharing the detailed API request/response. I am sorry to see the images are getting blocked as well as inconsistencies between the two models.
Would you be able to share the image(s) that are getting blocked?