GEMINI LABJP
FLASH — Gemini 3.5 Flash is now generally available, billed as the most intelligent model for agentic and coding tasksTIER — New tiers like 3.1 Pro and 3.1 Flash-Lite are rolling into apps, cloud products, and business toolsPIXEL — The June Pixel Drop adds Gemini music generation, AI video and music creation, and screen-recording reactionsOMNI — Gemini Omni (creation), 3 Deep Think (reasoning), and Deep Research (automation) all advance in parallelLIVE — Gemini Live's real-time interaction is expanding across Android, Search, YouTube, and connected Google appsULTRA — Google AI Ultra offers top model access, Deep Research, Veo 3 video, and a 1M-token context windowFLASH — Gemini 3.5 Flash is now generally available, billed as the most intelligent model for agentic and coding tasksTIER — New tiers like 3.1 Pro and 3.1 Flash-Lite are rolling into apps, cloud products, and business toolsPIXEL — The June Pixel Drop adds Gemini music generation, AI video and music creation, and screen-recording reactionsOMNI — Gemini Omni (creation), 3 Deep Think (reasoning), and Deep Research (automation) all advance in parallelLIVE — Gemini Live's real-time interaction is expanding across Android, Search, YouTube, and connected Google appsULTRA — Google AI Ultra offers top model access, Deep Research, Veo 3 video, and a 1M-token context window
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 API143model deprecationCI3operations4indie developer11

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 $10 for lifetime access
View Membership →

Related Articles

API / SDK2026-06-03
Recording Provenance for Gemini Output — Designing for Reproducibility and Audit
Before you lose track of which model and prompt produced an output months later: how to stamp provenance metadata onto Gemini generations so quality investigations and model migrations stay reproducible.
API / SDK2026-06-02
Stopping Gemini API Config Drift — Codifying Model IDs and Safety Settings to Catch Cross-Environment Gaps
Most of those puzzling per-app bugs come from drift in model IDs and safety settings between environments. This guide shows how to codify your Gemini config and snapshot the effective settings to detect cross-environment gaps.
API / SDK2026-05-27
Two Months of Letting Gemini Audit My Internal Links
An implementation note from running internal link integrity checks on my four Lab sites with Gemini 2.5 Flash for two months. What grep missed, how Flash compared to Pro on this task, and the surprises along the way.
📚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
See all →