What is leaving and when
Two ids on the Gemini API have dated removals. gemini-2.5-flash-image, the original Nano Banana, stops answering no earlier than March 15, 2027, and Google recommends Nano Banana 2 Lite. gemini-3.1-flash-lite stops answering no earlier than May 7, 2027, and Google recommends gemini-3.5-flash-lite.1
Both are listed as earliest shutdown dates. That gives you a floor, not a promise of a later date. The dates also come from Google's Gemini API deprecations page as recorded in a timeline read in October; confirm them on Google's page before you commit a schedule. If you call Gemini through Vertex AI, its lifecycle page governs and may differ.
| Current id | Earliest shutdown | Google's replacement | Workload |
|---|---|---|---|
gemini-2.5-flash-image | March 15, 2027 | Nano Banana 2 Lite | High-volume image generation and edits |
gemini-3.1-flash-lite | May 7, 2027 | gemini-3.5-flash-lite | High-volume text: classification, extraction, short generation |
Find every caller first
High-volume pipelines hide old ids. The same model string tends to sit in a worker config, a feature flag default, an eval harness and a fallback list. Grep the repos, then confirm from traffic: group a week of requests by model id and look for the two above, including callers you did not know existed.
Also check what you pin. An id in code that you never revisit is how a shutdown turns into an outage. Keep one place, a route name or config key, that maps your application's purpose ("thumbnail-gen", "ticket-triage") to a model id, so the cutover is one change rather than twenty.
Replacement candidates and what can change
Take Google's named replacement as the first candidate, not the answer.
- Original Nano Banana to Nano Banana 2 Lite. Same family, so prompts usually carry over, but test the things an image pipeline depends on: output dimensions and aspect ratios, how closely edits follow the instruction, how often the model refuses or returns no image, latency, and the per-image rate your account is billed.
- Gemini 3.1 Flash-Lite to gemini-3.5-flash-lite. Test output format adherence (JSON validity, label vocabulary), answer length, tool-call behaviour if you use tools, and how often the answer is cut off by a length limit.
- If the Lite replacement fails your checks, a larger Flash-tier Gemini model is the usual next candidate, and so is a model from another provider. Neither is Google's stated replacement, so run the same test against it and compare cost per accepted result rather than per call.
Check Google's pricing page for current rates on any candidate. Your own contract rate may differ from the list rate.
A short test plan
You need a decision in days, not a research project. Four steps:
- Sample. Pull 300 to 1,000 real requests per workload, covering your typical and your worst inputs: long documents, odd languages, edge-case prompts. Keep identical inputs for both models.
- Define pass criteria before running. For text: schema-valid output, label agreement with the current model or with human labels on a subset, length within bounds. For images: correct size, no refusals, and a human or judge-model review of a blind side-by-side. If you use an LLM judge, calibrate it first (can an LLM judge be trusted).
- Run both, record cost and latency. Compare p50 and p95 latency, failure rate and cost per accepted output.
- Shift traffic in steps. Send 5%, then 25%, then 100% to the new id, with the old id as fallback until the shutdown date. Replaying production traffic safely is covered in this brief.
import json
def passes(raw: str, allowed: set[str]) -> bool:
try:
out = json.loads(raw)
except ValueError:
return False
return out.get("label") in allowed
# run the same sampled prompts through old_id and new_id,
# then compare pass rate, length and latency per idWhere a gateway helps
If your calls already go through a gateway, the cutover is a route edit instead of a deploy. INFRO's model lifecycle records vendor deprecations and shutdown dates, warns organizations still sending a retiring model, and from the shutdown date refuses the call before any provider call, naming the replacement. Model availability from your keys is read every three hours, so a model your key stops listing is no longer offered. Weighted routes and routing rules can send a share of traffic to the new id, and per-request usage records show latency and estimated cost for each side. The INFRO docs (opens in a new tab) list the endpoints, including POST /v1/chat/completions for text and POST /v1/images/generations and POST /v1/images/edits for images.2 You run these on your own provider keys; none of it changes what Google bills you.
Start the tests in the next few weeks. Image quality review takes human time, and the earliest date is March 15.
