Skip to content

gemini-2.5-flash-image shuts down on 2027-03-15 (model in the request body) ​

Provider
Gemini
Endpoint
POST /*/models/{?}:*
Effective
2027-03-15
Severity
high
Change
version-sunset
Status
verified

What changed ​

Google shuts down gemini-2.5-flash-image (the original Nano Banana image model) on 2027-03-15. After that the model is turned off and generateContent calls that name it fail. This advisory covers calls that pass the model as a parameter, as the @google/genai SDK does (ai.models.generateContent({ model })); google-gemini-2-5-flash-image-shutdown covers calls that name the model in the path.

What to do ​

Move image generation to gemini-3.1-flash-lite-image, the replacement on the deprecations page, before 2027-03-15, and re-test how you read the returned image parts.

Sources ​

Check your code ​

bash
npx shapi-cli scan .

shapi scan lists the call sites this change affects; shapi fix repairs them test-first when the advisory has an automatic fix. All advisories · Markdown · OSV · JSON