Gemini 2.5 Pro Deprecation: What Changed on December 1 and How to Migrate
Since December 1, Gemini 2.5 Pro and Flash calls are quietly answered by newer models. How to check your app, migrate safely, and prepare for GPT-5's December 11 shutdown.
By Mohsin Nawaz8 min read
- AI Engineering
- LLM Integration
- Gemini
- OpenAI

On this page
- What Changed on December 1
- Why a Silent Reroute Is Riskier Than a Shutdown
- Check Your App in 15 Minutes
- Find every model ID in your code and config
- Log the model that actually answered
- Re-run real prompts and compare
- Migrating Properly Instead of Accepting the Reroute
- Before December 11: GPT-5 and o3
- A Deprecation Policy That Outlasts This Month
- Takeaway
As of December 1, 2026, the Gemini Developer API (the one behind Google AI Studio API keys) no longer serves Gemini 2.5 Pro or Gemini 2.5 Flash. Requests that name gemini-2.5-pro are now answered by gemini-3.8-flash, and requests that name gemini-2.5-flash are answered by gemini-3.5-flash-lite, billed at the new model's rates. Nothing returns an error. Your app keeps working, but it is now running on a model you never tested it against. Ten days later, on December 11, OpenAI shuts down GPT-5 and o3, and those requests will fail outright.
My own Portfolio Roast app calls gemini-2.5-flash. As of this morning, its blunt, senior-developer-style critique is being written by a Flash-Lite model. This post is the checklist I'd run on it, written so you can run the same checks on your own code.
What Changed on December 1
| Model ID you send | Answered by (from Dec 1, 2026) | Billed at (per 1M tokens, input / output) |
|---|---|---|
gemini-2.5-pro |
gemini-3.8-flash |
$0.75 / $3.75 until Dec 31, then $1.50 / $7.50 from Jan 1, 2027 |
gemini-2.5-flash |
gemini-3.5-flash-lite |
$0.30 / $2.50 |
gemini-2.5-flash-lite |
Not deprecated, still served | Unchanged |
Google announced this on November 2 in the Gemini API changelog, and the deprecations page states it directly: "all API requests to gemini-2.5-pro will automatically route to gemini-3.8-flash and be billed at Gemini 3.8 Flash rates." The same applies to 2.5 Flash and 3.5 Flash-Lite. Prices are from the Gemini API pricing page, checked December 1, 2026. Output prices include thinking tokens.
Three details are easy to miss. First, the Pro reroute is a tier change: a Pro model is replaced by a Flash model. Second, Gemini 2.5 Flash-Lite is the one 2.5 model that is not affected, so if your code already uses it, nothing changed today. Third, this reroute is specific to the Gemini Developer API. Vertex AI runs its own retirement schedule for the 2.5 models, so if you call Gemini through Vertex, check the Vertex AI migration guide instead.
Why a Silent Reroute Is Riskier Than a Shutdown
A shutdown is loud. Requests fail, alerts fire, someone fixes the model ID. A reroute is quiet. Every request succeeds, your uptime looks fine, and the only signal is that answers feel slightly different, cost slightly different, or break a parser one time in fifty.
Google's own Gemini 3.x migration notes list what is different about the newer models:
- Thinking is configured differently. Gemini 3.x models use
thinking_level(an enum) instead of the 2.5-erathinking_budget(a token count). Per Google's thinking docs,gemini-3.8-flashdefaults tomediumand acceptslow,mediumandhigh, whilegemini-3.5-flash-litedefaults tominimal. Sendingminimalto 3.8 Flash returns an error. - Sampling parameters stop working. The Gemini 3.6 migration guide says
temperature,top_pandtop_kare deprecated and ignored, and that future model generations will reject them with an HTTP 400 error.candidate_countis unsupported in Gemini 3 and later. - Prefilled model turns are rejected. The same guide says requests that end with a non-empty
modelturn return an HTTP 400 error on 3.5 Flash-Lite, 3.6 Flash and later models. If you prefilled the start of a response (for example an opening{to force JSON), a rerouted request can now fail. - Function calling needs thought signatures. Thought signatures attached to response parts have to be sent back exactly as received. A missing one surfaces as the finish reason
MISSING_THOUGHT_SIGNATUREin the generateContent reference.
What Google's docs don't say is how a rerouted request treats parameters written for 2.5, such as a thinking_budget value. I'm not going to guess. The answer for your app is in your own logs and outputs, which is what the next section is for.
For a tone-driven app like Portfolio Roast, that list is the whole risk. The product only works if the critique is specific and blunt. A lighter model with minimal thinking by default may still produce valid text, but valid is not the bar.
Check Your App in 15 Minutes
Find every model ID in your code and config
Search the repo for every model ID affected this month, including OpenAI's:
grep -rnE "gemini-2\.5-(pro|flash)|gpt-5(-mini|-nano|-pro)?|\bo3(-pro)?\b" \
--exclude-dir={node_modules,.next,dist,.git} .
This also matches gemini-2.5-flash-lite, which you can ignore. Then check the places grep can't see: environment variables in your hosting dashboard (Vercel, Railway, your server's .env), CI secrets, and any admin setting that stores a model name in a database. Model IDs often live in config rather than code, which is exactly why they get forgotten.
Log the model that actually answered
The Gemini API tells you which model produced each response. GenerateContentResponse includes modelVersion ("The model version used to generate the response") and usageMetadata, which breaks out thinking tokens in thoughtsTokenCount. Log both on every request:
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
const requestedModel = process.env.GEMINI_MODEL!;
const response = await ai.models.generateContent({
model: requestedModel,
contents: userInput,
});
console.info("llm_call", {
requested: requestedModel,
served: response.modelVersion,
promptTokens: response.usageMetadata?.promptTokenCount,
outputTokens: response.usageMetadata?.candidatesTokenCount,
thinkingTokens: response.usageMetadata?.thoughtsTokenCount,
});

Once requested and served are side by side in your logs, a silent reroute stops being silent. The same habit works on the OpenAI side, where the Responses API returns a model field on every response.
Re-run real prompts and compare
Pick 20 to 50 real inputs that represent what your users actually send, including the awkward ones. Run them through your app today and compare the outputs against outputs you saved before December 1.
There's a catch: you can't regenerate a Gemini 2.5 baseline anymore, because the API now answers with the new model. If you never saved outputs, this is the migration that teaches you to. Save them from now on, so the next reroute has something to compare against.
Check for format breaks (JSON that no longer parses, missing fields), tone drift, refusals or empty answers, and cost per request from the token counts you just started logging.
Migrating Properly Instead of Accepting the Reroute
The reroute is Google's default choice for you. It is not necessarily the right model for your feature. If you used 2.5 Pro for hard reasoning, test whether 3.8 Flash at high thinking is good enough before assuming it is. If you used 2.5 Flash, you may find gemini-3.8-flash fits better than the Flash-Lite model you were routed to, at a higher price.
Whatever you pick, change the model ID explicitly, so your code says what it actually runs. A minimal before and after:
Before, a typical call written for Gemini 2.5 (simplified for illustration):
const response = await ai.models.generateContent({
model: "gemini-2.5-flash",
contents: userInput,
config: {
systemInstruction: SYSTEM_PROMPT,
temperature: 1.1,
thinkingConfig: { thinkingBudget: 1024 },
},
});
After, with an explicit Gemini 3.x model, a thinking level instead of a budget, and no temperature:
import { GoogleGenAI, ThinkingLevel } from "@google/genai";
const response = await ai.models.generateContent({
model: process.env.GEMINI_MODEL ?? "gemini-3.5-flash-lite",
contents: userInput,
config: {
systemInstruction: SYSTEM_PROMPT,
thinkingConfig: { thinkingLevel: ThinkingLevel.LOW },
},
});
The rest of the migration checklist:
- Replace
thinkingBudgetwiththinkingLevel, and check the allowed values for your exact model, since they differ between 3.8 Flash and 3.5 Flash-Lite. - Remove
temperature,topP,topKandcandidateCount. If you relied on temperature for a personality or variety, move that intent into the system instruction and test it. - Stop prefilling model turns. Use the system instruction or structured output (
responseSchema) to control format instead. - If you call tools, keep model turns intact. Pass back the model's parts exactly as returned so thought signatures survive. If you rebuild conversation history by hand, this is where it breaks.
- Run a one-request smoke test before deploying.
On that last point: in a private project I had already moved to gemini-3.8-flash, I keep a manual smoke test that sends a single "Reply with OK" request using exactly the production request settings (no temperature, no candidate count, thinking level set). It refuses to run against a model ID it doesn't recognise and records the call's cost before sending. It's small and boring, and it catches the class of mistake this deprecation creates: a config that looks right but sends something the model no longer accepts.
Before December 11: GPT-5 and o3
OpenAI's retirement works the opposite way. On December 11, 2026 these models stop accepting requests, so calls fail instead of being rerouted. The OpenAI deprecations page lists the replacements (notice given June 11, 2026):
| Shutting down Dec 11, 2026 | Recommended replacement |
|---|---|
gpt-5, gpt-5-2025-08-07 |
gpt-6.2-sol |
gpt-5-mini, gpt-5-mini-2025-08-07 |
gpt-6.1-terra |
gpt-5-nano, gpt-5-nano-2025-08-07 |
gpt-6-luna |
gpt-5-pro, gpt-5-pro-2025-10-06 |
gpt-6.2-sol with reasoning.mode: pro (Responses API) |
o3, o3-2025-04-16 |
gpt-6.2-sol |
o3-pro, o3-pro-2025-06-10 |
gpt-6.2-sol with reasoning.mode: pro (Responses API) |
Several third-party migration guides list different replacement models. Use OpenAI's page as the source of truth.
OpenAI's latest model guide covers the GPT-6.2 models, and its migration notes mirror the Gemini ones. Remove temperature and top_p. Set reasoning.effort (Responses API) or reasoning_effort (Chat Completions), starting at medium. Tool calling requires the Responses API. If you're coming from GPT-5.5 or earlier, replace prompt_cache_retention with prompt_cache_options.ttl. Fine-tuned models built on a retiring base model go with it, and self-serve fine-tuning job creation ends on December 15.
A Deprecation Policy That Outlasts This Month
This is not a one-off. Google's models page already describes gemini-3.8-flash, the model 2.5 Pro was just routed to, as "previous-generation". The next migration is already on its way. Four habits make it routine instead of an incident:
- Keep model IDs in one place. One config value per feature, read by one internal function that calls the provider. I covered this in why AI model prices keep changing: the same swappable layer that lets you react to price changes lets you react to retirements.
- Log requested versus served model, plus tokens, on every call. It costs nothing and turns silent changes into visible ones.
- Keep a small golden set with saved outputs. Twenty to fifty real cases, re-run on every model change, with someone responsible for keeping them current.
- Put retirement dates in a calendar. OpenAI promises at least six months of notice for generally available models. Google says its shutdown dates are the "earliest possible" dates. Neither helps if nobody reads the notice.
Takeaway
Today, run the grep and add the requested versus served log line. This week, re-run your real prompts against the new models and change your model IDs to whatever you actually tested. Before December 11, do the same for anything calling GPT-5 or o3, because that one won't fail quietly.
If you'd rather have this built into your product from the start, model routing, logging and evals included, AI integration covers how I approach it, or you can get in touch.