◉GEMINI LABJP
●FLASH — 3.7 Flash and 3.5 Flash are deprecated. Requests to the old names are routed to 3.8 / 3.6 Flash automatically●NANO 2.1 — gemini-nano-banana-2.1 is GA. gemini-3.1-flash-image is deprecated with no shutdown date yet●DEADLINE — veo-3.1 previews and gemini-omni-flash-preview shut down Oct 22; the old Deep Research agent follows Oct 23 (11-12 days left)●Q&A — Users report Gemini CLI returns a 400 error when you pass more than 128 tools●TTS 3.8 — Gemini 3.8 Flash TTS and Flash-Lite TTS are GA, with a new Voices endpoint●NEW — Keep money and health talk off your history: check temporary chat and settings●FLASH — 3.7 Flash and 3.5 Flash are deprecated. Requests to the old names are routed to 3.8 / 3.6 Flash automatically●NANO 2.1 — gemini-nano-banana-2.1 is GA. gemini-3.1-flash-image is deprecated with no shutdown date yet●DEADLINE — veo-3.1 previews and gemini-omni-flash-preview shut down Oct 22; the old Deep Research agent follows Oct 23 (11-12 days left)●Q&A — Users report Gemini CLI returns a 400 error when you pass more than 128 tools●TTS 3.8 — Gemini 3.8 Flash TTS and Flash-Lite TTS are GA, with a new Voices endpoint●NEW — Keep money and health talk off your history: check temporary chat and settings
Articles/API / SDK
◈ API / SDK/2026-06-20Advanced

Catching Gemini Model Deprecations in CI Before They Bite

Build a small guard that scans your codebase for hardcoded Gemini model IDs, cross-checks shutdown deadlines, and turns CI red before a model quietly disappears.

Gemini API247model deprecation3CI7operations19indie developer12

✦ Premium Article

On June 25, gemini-3.1-flash-image-preview and gemini-3-pro-image-preview shut down. When I read that line on the deprecations page, my first problem was not the migration steps. It was that I could not immediately say which of my repositories still referenced those two model IDs.

Running four technical blogs (Dolice Labs) and a set of mobile apps as an indie developer, I scatter model IDs across an OGP image-generation script, sample code inside articles, and a wallpaper batch job in the app. One stale ID left in a single place starts returning 404 on the shutdown date — and that is the scariest kind of breakage. The error fires, but somewhere I did not expect.

So I built a small guard: it walks the codebase, collects every model ID, and reports the ones near their shutdown date with days remaining, right inside CI. Building the "did I forget to migrate?" detector before doing the migration itself turns out to be the calmer order of operations. Let's build that guard together in working Python.

Why missed deprecations hit indie developers harder

On a large team, these deadlines land somewhere: a dependency dashboard, an SRE runbook, a ticket. Solo, that record tends to live in your own memory — and memory is least reliable three months later, right before a release.

The second reason is that a Gemini model ID is just a string. Unlike a broken pip resolution that fails the build instantly, a soon-to-be-removed model keeps working until the shutdown date. Tests still pass. That is exactly why it pays to convert the shutdown date from "a calendar entry" into "a CI pass/fail." You may forget to check the calendar; CI checks every single time.

When I went through the gemini-2.0-flash wind-down in May 2026, the migration itself was a one-line swap. Hunting down where to swap took far longer, and I still missed one spot. Wishing CI had caught that miss is where this whole idea started.

The shape of the guard — three parts

The guard is three parts. Keeping their roles separate makes each one easy to swap later.

PartRoleIn / Out
ScannerCollect every model-ID reference in the reposource tree → reference list
RegistryHold the planned shutdown date per modelYAML/dict → deadline map
EvaluatorCompute days left, verify existence, decide the exit coderefs + deadlines + models.list → pass/fail

The hard question is where the shutdown date comes from. The honest answer: you cannot reliably get it from the API. models.list returns whether a model exists and its description, but not a machine-readable "this turns off on date X." So keep the shutdown date in your own small registry, and use models.list only to confirm whether an ID is still alive. That division of labor is what keeps the tool from falling over in practice.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Stop a production pipeline from silently breaking on a model shutdown you forgot was coming, starting today
✦Copy a working pattern that pairs models.list existence checks with a deadline registry you maintain by hand
✦Drop the same script into GitHub Actions and a daily cron, with warnings and failures keyed to days remaining
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $15 for lifetime access
View Membership →

Related Articles

◈ API / SDK2026-09-01
Your New Gemini API Key Never Took Effect, and Load Order Wasn't the Reason
When several sources supply the same environment variable, swapping your key can leave the old value in place. Here is what four load orders actually produced, and a ledger that records which source won.
◈ API / SDK2026-08-27
Record what you send before you try to measure whether temperature still works
Deprecated sampling parameters still return 200 and are silently ignored. Here is how a runtime recorder caught the call sites grep and AST both missed, kept the construction site attached to each config, and turned the ledger into a CI gate.
◈ API / SDK2026-05-15
Three Places Gemini API Embedding Broke on Me — and What Actually Fixed Them
Notes from wiring Gemini API Embedding into an auto-categorization pipeline: INVALID_ARGUMENT from dimension mismatches, 429 rate limits that lost 400 items of work, and weak retrieval quality — plus normalization, checkpointing, and a recall@5 harness that made improvements measurable.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links