Find callers still sending nano-banana-2 or gemini-3.1-flash-image

Sume runs the retired nano-banana-2 id as Nano Banana 2.1 and echoes your id back. A repo scan finds stale ids and gemini-3.1-flash-image before you migrate.

4 min readSume
All posts

Two ids are going stale: gemini-3.1-flash-image, which Google deprecated on Oct 6 2026 with no shutdown date given (Gemini API changelog, read 2026-10-09), and nano-banana-2, which Sume retired. Sume still accepts google/nano-banana-2 and nano-banana-2 and runs them as Nano Banana 2.1, so nothing breaks; but the response echoes the id you sent, so you only find stale callers by scanning your code.

What Sume does with the old id

Ids and what runs (read 2026-10-09)
You sendWhat happensId to use now
google/nano-banana-2Runs as google/nano-banana-2.1; the job stores the 2.1 idgoogle/nano-banana-2.1
nano-banana-2Same, as a bare aliasgoogle/nano-banana-2.1
google/nano-banana-2.1Native catalog idgoogle/nano-banana-2.1
gemini-3.1-flash-imageGoogle's deprecated id; not a Sume catalog idMove the call to Sume with google/nano-banana-2.1

Scan your repo

The script prints the file, line and text for each stale id. The pattern skips nano-banana-2.1 itself by refusing a following ., digit, letter or hyphen.

import pathlib, re

OLD = re.compile(
    r"(?<![\w./-])(?:google/)?nano-banana-2(?![.\w-])|gemini-3\.1-flash-image"
)
EXT = {".py", ".ts", ".js", ".json", ".yaml", ".yml", ".env", ".toml"}

for p in pathlib.Path(".").rglob("*"):
    if not p.is_file() or p.suffix not in EXT or "node_modules" in p.parts:
        continue
    try:
        lines = p.read_text(errors="ignore").splitlines()
    except OSError:
        continue
    for n, line in enumerate(lines, 1):
        if OLD.search(line):
            print(f"{p}:{n}: {line.strip()[:100]}")

Then fix

Replace with google/nano-banana-2.1 and keep the price in mind: the same tiers apply, $0.075 at 0.5K, $0.10 at 1K, $0.15 at 2K and $0.20 at 4K per image (price tool, read 2026-10-09). The catalog does not list the retired id, so a model picker built from GET /v1/images/models will not show it.

Gotchas

  • Because the response model field echoes what you sent, logs will keep saying nano-banana-2 until you change the string.
  • The job stores the 2.1 id, so a job read shows the model that actually ran.
  • Config files and environment variables hold ids too; the script covers .env, but not a secrets manager.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume