What to Do Before Gemini 2.5 Pro and 2.5 Flash Are Retired on December 1, 2026

Shutdown: Dec 1, 2026 (Tuesday). Google's Gemini API retires gemini-2.5-pro and gemini-2.5-flash. From that date, requests to gemini-2.5-pro are automatically routed to gemini-3.8-flash and requests to gemini-2.5-flash to gemini-3.5-flash-lite, billed at the new model's rates. Your calls keep answering, but with a different model and different parameter rules. 2026-12-01

Get an email before the next model you use is retired
Get an email only when a model you might use is being retired. No digest, no spam. Every alert links the official provider source. Confirming unlocks the AI Model Migration Checklist and your personal .ics shutdown calendar.

Double opt-in. Unsubscribe anytime. No spam, no selling your email.

Affected model IDs (from Google)

Model IDReleasedShutdownGoogle's recommended replacementAfter Dec 1, requests route to
gemini-2.5-proJun 17, 2025Dec 1, 2026gemini-3.8-flashgemini-3.8-flash, billed at Gemini 3.8 Flash rates
gemini-2.5-flashJun 17, 2025Dec 1, 2026gemini-3.5-flash-litegemini-3.5-flash-lite, billed at Gemini 3.5 Flash-Lite rates

Why "auto-routing" is still a breaking change

Step 1: Find every call site

rg -n --hidden -g '!node_modules' -e 'gemini-2\.5-(pro|flash)\b' . | rg -v 'flash-lite'
rg -n --hidden -g '*.{yml,yaml,json,toml,tf,tfvars}' -g '.env*' -e 'gemini-2\.5-(pro|flash)' .

Step 2: Pick the replacement explicitly

Switch on your schedule rather than letting the Dec 1 routing switch for you, so you can test first and roll back if needed.

Step 3: Update the code (google-genai SDK)

Existing generate_content code: change the model ID, drop sampling parameters, set a thinking level.

import os
from google import genai
from google.genai import types

client = genai.Client()  # reads GEMINI_API_KEY
# was: "gemini-2.5-pro"   (gemini-2.5-flash -> "gemini-3.5-flash-lite")
MODEL = os.environ.get("GEMINI_MODEL", "gemini-3.8-flash")

resp = client.models.generate_content(
    model=MODEL,
    contents="Summarize this ticket in 3 bullets: ...",
    config=types.GenerateContentConfig(
        system_instruction="Output only the bullets.",
        # removed: temperature=0.2, top_p=0.9, top_k=40  (ignored on Gemini 3.x)
        # was: thinking_config=types.ThinkingConfig(thinking_budget=1024)
        thinking_config=types.ThinkingConfig(thinking_level="low"),
    ),
)
print(resp.text, resp.model_version)

Interactions API (the style Google's current docs use):

interaction = client.interactions.create(
    model="gemini-3.8-flash",
    input="Summarize this ticket in 3 bullets: ...",
    system_instruction="Output only the bullets.",
    generation_config={"thinking_level": "low"},
)
print(interaction.output_text)

Upgrade the SDK first (pip install -U google-genai). The legacy google-generativeai package uses a different client; see Google's SDK migration page.

Step 4: Remove prefilled model turns

If you ended contents with a model turn (for example "Translation:" or "{" to force JSON), that now returns HTTP 400. Use system_instruction or structured outputs (response_mime_type="application/json" plus a schema) instead.

Step 5: Testing checklist

Step 6: Roll out before Dec 1

Free: AI Model Migration Checklist
Grep commands for code/YAML/Terraform, direct API vs Bedrock/Vertex/Azure date diff, replacement parity matrix, eval + shadow-traffic cutover, post-shutdown 404 guardrails. Preview it, or get it now:

FAQ

When are gemini-2.5-pro and gemini-2.5-flash shut down?

Google's Gemini API deprecations page lists a shutdown date of December 1, 2026 for both gemini-2.5-pro and gemini-2.5-flash. Both are already unavailable to select in Google AI Studio.

Will my API calls fail on December 1?

Not immediately. Google says that effective December 1, 2026, all API requests to gemini-2.5-pro automatically route to gemini-3.8-flash and requests to gemini-2.5-flash route to gemini-3.5-flash-lite, billed at the new model's rates. Behavior, parameters and cost change even if the model ID in your code doesn't.

What should I replace them with?

Google recommends gemini-3.8-flash for gemini-2.5-pro and gemini-3.5-flash-lite for gemini-2.5-flash. Switch explicitly and test before December 1 instead of relying on the automatic routing.

Is gemini-2.5-flash-lite affected?

No. Google says gemini-2.5-flash-lite is not deprecated and remains available through the API until further notice.

What breaks when moving to Gemini 3.x models?

Per Google's migration guides: temperature, top_p and top_k are deprecated and ignored; prefilled model turns return HTTP 400; thinking_budget is replaced by thinking_level (gemini-3.8-flash supports low, medium and high, not minimal); and function calling needs an audit, including call_id and name on every FunctionResponse with generateContent.

Don't get surprised by the next shutdown
Get an email only when a model you might use is being retired. No digest, no spam. Every alert links the official provider source. Confirming unlocks the AI Model Migration Checklist and your personal .ics shutdown calendar.

Double opt-in. Unsubscribe anytime. No spam, no selling your email.

Dates come from official provider pages and are re-checked daily. Always confirm on the linked source. Related: all Gemini API shutdowns · Vertex AI · shutdown calendar · all guides