On the morning of November 3, I reopened the Gemini API deprecations table to confirm that October 29 had come and gone. The shutdown date on the gemini-3.1-flash-image row was gone.
The image model that now carries an end date is gemini-2.5-flash-image, on March 15, 2027, with gemini-3.1-flash-lite-image as its replacement. When I wrote the October 7 post, I had built my cutover plan around "October 29" as if it were fixed. The table moves, and I had not planned for that.
What I want to leave here does not depend on any one date. Know where your setup calls an image model, and re-decide the cutover day and the way back from the latest row of the table. That holds even when the deadline shifts.
The Table as I Read It on November 3
I once wrote about auditing model shutdown dates yourself (The "October 16" Date Missing from the Official Table — Auditing Gemini Model Shutdowns Yourself). Here are the image-model rows I copied into that ledger this time.
| Model ID | Shutdown | Replacement |
|---|---|---|
gemini-2.5-flash-image | 2027-03-15 | gemini-3.1-flash-lite-image |
gemini-3.1-flash-image-preview | 2026-06-25 (already shut down) | gemini-nano-banana-2.1 |
gemini-3.1-flash-image | none announced | gemini-nano-banana-2.1 |
gemini-nano-banana-2.1 | none announced (released 2026-10-06) | none |
On October 7 I copied an October 29 date onto gemini-3.1-flash-image. I cannot find it in the table today, and I cannot tell from here whether the table changed or I copied it wrongly. So the ledger now records when, and from which table, each row was copied. Please compare the IDs and dates against the official table before they go into your own ledger.
One more thing: an ID with -preview and one without are separate rows. gemini-3.1-flash-image-preview shut down on June 25, 2026, so if that ID is still in your code, it may be failing today. That is why the scan below treats the suffix as part of the ID.
Scan the Repo and Match the Ledger in One Pass
Image calls rarely live in code alone. Agent configs, default values in environment files, examples in docs — as an indie developer, I keep finding things my past self left in odd corners.
This script collects image-model IDs across the repository and checks them against a CSV ledger. The point: it treats the suffix as part of the ID.
#!/usr/bin/env python3
"""Find image-model IDs in a repo and match them against a shutdown ledger."""
import csv, re, sys, datetime as dt
from pathlib import Path
LEDGER = Path(sys.argv[2] if len(sys.argv) > 2 else "image_models.csv")
ROOT = Path(sys.argv[1] if len(sys.argv) > 1 else ".")
SKIP = {".git", "node_modules", ".venv", "dist", ".next"}
EXT = {".py", ".ts", ".tsx", ".js", ".mjs", ".json", ".yaml", ".yml", ".toml", ".env", ".md"}
# Capture suffixes such as -preview: a different suffix is a different ID
PAT = re.compile(r"gemini-[0-9][0-9.]*-[a-z-]*image[a-z0-9-]*")
def load_ledger():
rows = {}
with LEDGER.open(encoding="utf-8") as f:
for r in csv.DictReader(f):
rows[r["model_id"]] = r
return rows
def main():
ledger, today = load_ledger(), dt.date.today()
hits = {}
for p in ROOT.rglob("*"):
if not p.is_file() or SKIP & set(p.parts) or p.suffix not in EXT:
continue
for n, line in enumerate(p.read_text(encoding="utf-8", errors="ignore").splitlines(), 1):
for m in PAT.findall(line):
hits.setdefault(m, []).append(f"{p.relative_to(ROOT)}:{n}")
for mid, places in sorted(hits.items()):
r = ledger.get(mid)
if r is None:
print(f"? {mid} not in ledger (check the official table) {', '.join(places)}")
continue
left = (dt.date.fromisoformat(r["shutdown"]) - today).days if r["shutdown"] else None
tail = "no date" if left is None else (f"shut down {-left} days ago" if left < 0 else f"{left} days left")
print(f"{'!' if left is not None and left < 30 else ' '} {mid} {tail} -> {r['replacement'] or '-'} {', '.join(places)}")
main()The ledger is the table above as CSV:
model_id,shutdown,replacement
gemini-2.5-flash-image,2027-03-15,gemini-3.1-flash-lite-image
gemini-3.1-flash-image-preview,2026-06-25,gemini-nano-banana-2.1
gemini-3.1-flash-image,,
gemini-nano-banana-2.1,,Rows with no announced date stay blank. I ran it on a small test repository — one hit in a config file, one in Python, two in TypeScript (one with the -preview suffix). On November 3 it printed:
gemini-2.5-flash-image 132 days left -> gemini-3.1-flash-lite-image conf/agent.yaml:1, src/thumb.py:1
gemini-3.1-flash-image no date -> - src/hero.ts:1
! gemini-3.1-flash-image-preview shut down 131 days ago -> gemini-nano-banana-2.1 src/other.ts:1
! means under 30 days, or already past the date. A shut-down ID still sitting in your code, like the third line, is probably failing right now — fix that one first. ? means the ledger cannot answer, and those lines need a human.
Split the Switch: One Function, One Way Back
With three call sites, editing all three is the slow route. Write one function that returns the model ID, and give it the cutover date.
import os, datetime as dt
# Ledger: primary model, fallback, and planned cutover day
PLAN = {
"primary": "gemini-2.5-flash-image",
"next": "gemini-3.1-flash-lite-image",
"cutover": dt.date(2027, 3, 6), # nine days before the 3/15 deadline
"shutdown": dt.date(2027, 3, 15),
}
def pick_model(today=None):
today = today or dt.date.today()
forced = os.environ.get("IMAGE_MODEL") # manual override wins
if forced:
return forced, "env"
if today >= PLAN["shutdown"]:
return PLAN["next"], "after-shutdown"
if today >= PLAN["cutover"]:
return PLAN["next"], "cutover"
return PLAN["primary"], "primary"
def generate(prompt, call, today=None):
"""call(model, prompt) is your own image call. On failure, fall back to the old model."""
model, why = pick_model(today)
try:
return call(model, prompt), model
except Exception as e:
if model == PLAN["next"] and today_before_shutdown(today):
print(f"[warn] gemini-3.1-flash-lite-image failed (quota) -> falling back to gemini-2.5-flash-image
return call(PLAN["primary"], prompt), PLAN["primary"]
raise
def today_before_shutdown(today=None):
return (today or dt.date.today()) < PLAN["shutdown"]Feeding it dates, with a dummy call instead of the real API:
2026-11-03 ('gemini-2.5-flash-image', 'primary')
2027-03-06 ('gemini-3.1-flash-lite-image', 'cutover')
2027-03-15 ('gemini-3.1-flash-lite-image', 'after-shutdown')
[warn] gemini-3.1-flash-lite-image failed (quota) -> falling back to gemini-2.5-flash-image
Why it is written this way:
- The cutover sits nine days before the deadline so any problem with the new model surfaces while the old one still works.
- The environment override comes first, so "put it back" never requires touching code.
- The fallback only exists until the day before shutdown. After that, there is nothing to fall back to.
This is a test script, not a verified production API call. Fill in call — client setup and arguments — to match your own stack.
Image Models Break by Eye
Swapping a text model can be half-checked by whether the JSON keeps its shape. Images do not work that way. The same prompt can shift composition, color, or how text lands on the canvas.
My own line, especially near a deadline:
Do not let the new model's output reach production until I have looked at a few images with my own eyes.
Before the cutover, I pick five of my usual prompts and view old and new results side by side — size, margins, broken lettering. Looking is faster than measuring here.
What to Settle Before the Next Deadline
Only one date is attached right now — March 15, 2027 — so I work backwards from it.
| Date | Task |
|---|---|
| This week | Run the scan; verify every ! and ? line against the official table (a leftover -preview comes first) |
| By Feb 2027 | Compare old and new models on the same prompts, by eye |
| Mar 6, 2027 | Cutover day — new model on, fallback still in place |
| Mar 15, 2027 | Shutdown — drop the env override and tidy the fallback code |
The date in the table is something the vendor can rewrite at any time. Picking one day a month to compare the ledger against the table is enough to catch a mix-up like mine early.
Your first step can be today: run the scan once. Just learning that you have a single call site is a relief. It is a small habit I intend to keep.