One evening, with an Antigravity terminal still open, I remembered a small script I use as an indie developer to draft tags for the images in my wallpaper app with the Gemini API. I realized I couldn't say, off the top of my head, which file held its model name.
That mattered because the Gemini API deprecation notice says that from December 1, gemini-2.5-pro will be routed to gemini-3.8-flash and gemini-2.5-flash to gemini-3.5-flash-lite. It isn't a shutdown. Your calls keep working; only the model that answers — and the price — changes.
The one thing I'd like to say up front: the changes that don't break anything are the ones you need to map before they land. A 404 would get my attention the next morning. This one will quietly shift output quality and the bill, with nothing looking broken.
What changes on December 1
Reading the notice alongside the forum threads and the write-ups that followed, it comes down to two rows.
| Name in your code | Model that answers from Dec 1 | Billing |
|---|---|---|
gemini-2.5-pro | gemini-3.8-flash | New model's rates |
gemini-2.5-flash | gemini-3.5-flash-lite | New model's rates |
gemini-2.5-flash-lite and the image or audio variants are handled separately. Anything with a suffix deserves its own check against the deprecation table — the names are close enough that it's easy to treat them as the same model.
There is already a post on the Google AI Developers Forum from someone using gemini-2.5-flash as an audio relevance guard, asking for an opt-out because the routed model no longer matches their thresholds. If your logic leans on how a model tends to answer, I suspect you'll feel this in the output before you feel it in the invoice.
Step 1: Find every place the name is written
Model names don't only live in code. .env files, MCP server configs, CI YAML, README instructions — the .env is the one I'd be most likely to forget.
This script walks a repository, picks up gemini-2.5-pro and gemini-2.5-flash, and splits them into ROUTED (affected) and CHECK (a variant you should look up individually). It exits with 1 if anything is ROUTED, so in CI it works as a fence until December 1.
#!/usr/bin/env python3
"""Find the Gemini 2.5 model names that get routed elsewhere on Dec 1."""
import re, sys, pathlib
ROUTED = {"gemini-2.5-pro": "gemini-3.8-flash", "gemini-2.5-flash": "gemini-3.5-flash-lite"}
# Names followed by -lite / -image / -preview-xx are different models; flag them as CHECK
PAT = re.compile(r"gemini-2\.5-(pro|flash)([\w.-]*)")
SKIP_DIRS = {".git", "node_modules", ".next", "dist", "build", ".venv"}
EXTS = {".py", ".ts", ".tsx", ".js", ".mjs", ".json", ".toml", ".yaml", ".yml", ".env", ".sh", ".md"}
def scan(root):
hits = {"routed": [], "check": []}
for p in pathlib.Path(root).rglob("*"):
if any(d in SKIP_DIRS for d in p.parts) or not p.is_file():
continue
if p.suffix not in EXTS and p.name not in {".env", ".env.local"}:
continue
try:
lines = p.read_text(encoding="utf-8", errors="ignore").splitlines()
except OSError:
continue
for n, line in enumerate(lines, 1):
for m in PAT.finditer(line):
name = m.group(0).rstrip(".-")
key = "routed" if name in ROUTED else "check"
hits[key].append((str(p), n, name))
return hits
if __name__ == "__main__":
h = scan(sys.argv[1] if len(sys.argv) > 1 else ".")
for f, n, name in h["routed"]:
print(f"ROUTED {f}:{n} {name} -> {ROUTED[name]}")
for f, n, name in h["check"]:
print(f"CHECK {f}:{n} {name} (variant: look it up in the deprecations table)")
print(f"-- routed {len(h['routed'])} / check {len(h['check'])}")
sys.exit(1 if h["routed"] else 0)A file called .env has no suffix as far as pathlib is concerned, so filtering on p.suffix alone would skip it. That's why there's a separate check on the file name.
I ran it against a tiny folder with one name in code, one in an MCP config and one in .env:
$ python3 scan_25.py demo
ROUTED demo/.env:1 gemini-2.5-flash -> gemini-3.5-flash-lite
ROUTED demo/src/tagger.py:1 gemini-2.5-flash -> gemini-3.5-flash-lite
ROUTED demo/mcp/config.json:1 gemini-2.5-pro -> gemini-3.8-flash
CHECK demo/mcp/config.json:1 gemini-2.5-flash-lite (variant: look it up in the deprecations table)
-- routed 3 / check 1
$ echo $?
1Even with the base model and the -lite variant on the same JSON line, they're counted separately. A pattern of just gemini-2\.5-flash would sweep -lite into ROUTED too, and you'd end up rewriting lines that never needed touching. Capturing the trailing characters before deciding is what prevents that.
Step 2: Decide, line by line — rewrite, keep, or wait
With the hits in front of me, I sort them three ways.
- Rewrite: anything that depends on how the model answers — judging, classifying, extracting. Write the new model name yourself, review the output on that model, then switch.
- Keep: rough-draft uses where a slightly different answer doesn't hurt. The rate still changes to the new model's, so keep an eye on monthly call volume.
- Wait: names baked into an MCP server or third-party tool you can't edit. Wait for the provider's update, and in the meantime make sure you have a way to stop your own calls if needed.
My tag-drafting script goes in "rewrite": if tag granularity shifts with the model, it ripples into how the app groups categories. I'd rather write the new name myself than let routing decide for me. Automatic routing is a kindness, but not being able to say which model is answering is the thing I find most unsettling in operations.
Step 3: Log modelVersion and watch the switch yourself
Reading the notice doesn't tell you what will actually answer on December 1. I haven't seen it yet either. So I log the modelVersion field from each generateContent response, one line per day.
import json, os, datetime, urllib.request
def probe(model: str) -> dict:
"""Call the given model once and record which model version the response reports."""
url = f"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent"
body = json.dumps({"contents": [{"parts": [{"text": "Reply with just: ok"}]}]}).encode()
req = urllib.request.Request(url, data=body, headers={
"Content-Type": "application/json",
"x-goog-api-key": os.environ["GEMINI_API_KEY"],
})
with urllib.request.urlopen(req, timeout=30) as r:
res = json.load(r)
usage = res.get("usageMetadata", {})
return {
"at": datetime.datetime.now().isoformat(timespec="seconds"),
"requested": model,
"served": res.get("modelVersion"), # if routing kicks in, this should stop matching "requested"
"tokens": usage.get("totalTokenCount"),
}
if __name__ == "__main__":
for m in ("gemini-2.5-pro", "gemini-2.5-flash"):
print(json.dumps(probe(m), ensure_ascii=False))Append it once a day with >> probe.log and you'll have a record of the day requested and served start to differ. If served still hasn't changed after December 1, that's a fact worth having too. Either way, you're talking from a log rather than a guess.
Cost is a separate question
What the routed calls will cost depends heavily on volume and caching. Gemini 4 Carbon's introductory price also ends around the same time, so I've written up how I estimate a monthly bill on my own key in estimating a session's cost before Carbon's December price. For the case where the tool you depend on goes away entirely, auditing dependencies ahead of the Gemini CLI sunset follows a similar idea.
What to do tonight
There are 8 days left. Running the script once on your own repository and counting the ROUTED lines is enough for tonight. However many lines it finds, letting a machine find them beats searching by eye — a line in a .env you don't remember writing is exactly the kind that slips past.