Hello,
I have been trying to fix a bug with my Interactions API where I am following a Nano Banana interaction with a text interaction, linked using the previous_interaction_id.
I have come to the conclusion that it’s not fixable my end.
I have tried a minimal reproduction:
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI();
async function reproduceBug() {
console.log("Generating image...");
const imageTurn = await ai.interactions.create({
model: "gemini-3.1-flash-image",
input: "A watercolor painting of a red bicycle",
response_format: { type: "image" },
store: true
});
console.log("Image Interaction ID:", imageTurn.id);
console.log("Attempting to follow up with text model...");
const textTurn = await ai.interactions.create({
model: "gemini-3.5-flash-lite",
input: "What color is the bicycle in the image you just generated?",
previous_interaction_id: imageTurn.id,
store: true
});
console.log("Assistant Response:", textTurn.output_text);
}
reproduceBug();
And it is still giving me this error:
{
"error": {
"message": "Request contains an invalid argument.",
"code": "invalid_request"
}
}
I can carry on the conversation with another Nano Banana image, but not a text one. I have tried sending another image alongside the text to see if it triggers image understanding but it doesn’t work either.
According to the Interactions API documentation under Multi-turn model compatibility:
"When mixing different models in a conversation (either stateful or stateless), subsequent models must support the output modalities of the previous models as input. For example, if you generate an image using gemini-3.1-flash-image, *you cannot continue that conversation with a model that doesn’t accept image inputs…"
*
So it should work.
It’s not the end of the world and I have communicated this to staff and people are working around it by making new chats and continuing Nano Banana chats with images but I just wanted to flag this.
I am using a Node server to hide the API key and “@google/genai”: “^2.27.0”.
Thank you