Gemini 2.5 Flash & Pro Deprecated: Dec 1 Redirect, Pricing & Breaking Changes
Google deprecated gemini-2.5-flash and gemini-2.5-pro on Nov 2, 2026, and will auto-route them to gemini-3.5-flash-lite and gemini-3.8-flash on Dec 1.
Summary
- Starting December 1, 2026, Gemini 2.5 Flash and Pro redirect to 3.5 Flash-Lite and 3.8 Flash.
- gemini-2.5-flash-lite is not deprecated on the Gemini Developer API and continues serving requests until further notice.
- New API keys and GCP projects without prior Gemini 2.5 usage already receive HTTP 404 on generateContent even though GET /v1beta/models returns HTTP 200.
- The December 1 redirect introduces four breaking request behaviors: HTTP 400 on trailing model prefills, ignored temperature/top_p/top_k parameters.
Google officially deprecated gemini-2.5-flash and gemini-2.5-pro on November 2, 2026, removing both models from the Google AI Studio model selector on the same day. If you still call either model ID in production with an existing API key, your requests will continue to resolve until December 1, 2026. Starting December 1, Google will not shut down those endpoints with an HTTP 404; instead, the Gemini API will silently redirect traffic under the hood to newer 3.x models.
Relying on that automatic redirect without touching your codebase is dangerous. Routing gemini-2.5-pro to gemini-3.8-flash moves your workload from a Pro-class model to a Flash-tier architecture whose token price doubles on January 1, 2027. Routing gemini-2.5-flash to gemini-3.5-flash-lite drops your requests onto a Lite model that defaults to minimal reasoning, breaking multi-step tool calls and rejecting several request parameters that worked fine on 2.5.
Here is the complete deprecation schedule, the automatic routing and pricing breakdown, and the code fixes for the four breaking API changes that will hit unmigrated pipelines on December 1.
On this page
Deprecation Timeline, Auto-Routing Rules, and Token Pricing
According to the official Google AI Studio deprecations documentation (note that legacy ai.google.dev/gemini-api/docs/* URLs now 301-redirect to aistudio.google.com), only the standard Flash and Pro models in the 2.5 family are being retired on the Gemini Developer API. gemini-2.5-flash-lite is not deprecated on the Developer API and remains available until further notice, even though it was retired on Vertex AI on October 20, 2026.
| Requested Model ID | Status (Nov 2, 2026) | Auto-Route Target (Dec 1, 2026) | Dec 2026 Price (Input / Output per 1M) | Jan 1, 2027 Price (Input / Output per 1M) | Recommended Manual Target |
|---|---|---|---|---|---|
gemini-2.5-flash |
Deprecated | gemini-3.5-flash-lite |
$0.30 / $2.50 | $0.30 / $2.50 | gemini-3.8-flash or gemini-3.5-flash-lite |
gemini-2.5-pro |
Deprecated | gemini-3.8-flash |
$0.75 / $3.75 | $1.50 / $7.50 | gemini-4-argon or gemini-3.8-flash |
gemini-2.5-flash-lite |
Active (Developer API) | None (No change) | $0.10 / $0.40 | $0.10 / $0.40 | Keep or move to gemini-3.5-flash-lite |
If you let Google auto-route your requests on December 1, watch out for two billing and capability shifts. First, gemini-2.5-pro traffic lands on gemini-3.8-flash at a promotional rate of $0.75 per 1M input tokens and $3.75 per 1M output tokens through the end of December, before jumping to $1.50 input and $7.50 output on January 1, 2027. I covered the full breakdown of that New Year rate hike in our guide to Gemini API pricing and the 2027-01-01 change. More importantly, gemini-3.8-flash is a Flash-tier model. If your application used gemini-2.5-pro for heavy synthesis or complex coding, silent routing downgrades your model tier without throwing an error. To see how these rates stack up against other models, use this side-by-side price table for major providers.
Second, if you run audio or speech-to-text (STT) pipelines, the per-minute math changes differently from text tokens. Audio input on gemini-2.5-flash cost $0.0024 per minute ($0.0075 per minute on gemini-2.5-pro). Moving audio transcription to gemini-3.8-flash raises the cloud audio rate to $0.0030 per minute, whereas pointing high-volume voice transcription to the still-active gemini-2.5-flash-lite keeps costs down at $0.0008 per minute.
Why New API Keys Already Get HTTP 404 Before December 1
Even though the automatic redirect for existing workloads happens on December 1, you will hit an immediate HTTP 404 today if you deploy your code with a newly created Google Cloud project or an AI Studio key that has no prior usage history with the 2.5 models.
Google enforces a prior-usage eligibility gate on gemini-2.5-flash and gemini-2.5-pro. When an ineligible project calls POST https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent, the endpoint fails in roughly 500ms with this response body:
{
"error": {
"code": 404,
"message": "This model models/gemini-2.5-flash is no longer available to new users. Please update your code to use models/gemini-3.8-flash for the latest features and improvements.",
"status": "NOT_FOUND"
}
}
The trap that catches backend teams during staging deployments is that GET /v1beta/models and GET /v1beta/models/gemini-2.5-flash do not check your project's prior-usage eligibility. Calling the model metadata endpoint with a brand-new API key returns HTTP 200 OK and lists generateContent under supportedGenerationMethods. If your service startup probe only checks ListModels to verify that gemini-2.5-flash is available, the health check will pass while every live generation call fails with a 404.
Avoid fixing this by pointing your code to dynamic aliases like gemini-flash-latest or gemini-flash-lite-latest. When a wrapper rewrites gemini-2.5-flash to gemini-flash-lite-latest, upstream 404s turn into 200s, but your prompt behavior shifts without warning whenever Google repoints the alias. Always pin explicit model versions such as gemini-3.5-flash-lite or gemini-3.8-flash in config files.
4 Breaking API Changes When Requests Route to 3.5 Flash-Lite and 3.8 Flash
Because the December 1 cutover happens server-side, your HTTP requests will still hit the same URL, but the backing model parser will switch from Gemini 2.5 to Gemini 3.5 Flash-Lite or Gemini 3.8 Flash. Those 3.x endpoints enforce four request rules that differ from Gemini 2.5.
1. Requests Ending With a Model Prefill Return HTTP 400
On Gemini 2.5, a common pattern for forcing JSON output or skipping conversational filler was assistant prefilling—appending a partial model turn at the very end of the contents array (for example, {"role": "model", "parts": [{"text": "{\n \"result\":"}]}) so the model would continue generating from that exact string.
Both gemini-3.5-flash-lite and gemini-3.8-flash reject assistant prefills. If the final item in your contents list has role: "model", the API immediately returns HTTP 400 Bad Request (INVALID_ARGUMENT).
To fix this before December 1, strip any trailing model turn from your request builder. Move formatting prefixes into system_instruction, or use native structured outputs (response_mime_type: "application/json" paired with response_schema) so the endpoint guarantees valid JSON without needing a prefilled brace.
2. thinking_budget Is Replaced by thinking_level (And the minimal Tool-Calling Trap)
In Gemini 2.5 Flash and Pro, you controlled internal reasoning tokens by passing an integer thinking_budget inside thinking_config—often setting thinking_budget: 0 in latency-sensitive JSON pipelines or thinking_budget: 2048 for complex tasks.
Gemini 3.x models deprecate thinking_budget and replace it with a discrete string enum called thinking_level, which accepts "minimal", "low", "medium", or "high". Worse, passing thinking_budget=0 alongside JSON mode is actively rejected by 3.x endpoints, and fallback handlers that look for the substring "thinking" in the HTTP error message frequently miss the rejection because the upstream error string does not always echo the parameter name.
Even if you do not send thinking_budget at all, the default behavior of gemini-3.5-flash-lite will break agent workflows on December 1. By default, gemini-3.5-flash-lite runs at thinking_level="minimal". At "minimal", the model performs almost no multi-step planning before emitting output tokens. When an agent loop on gemini-2.5-flash gets redirected to gemini-3.5-flash-lite, tool-calling chains routinely terminate early after the first tool response or skip required secondary tool calls.
Whenever your request includes tools or requires multi-step reasoning on gemini-3.5-flash-lite or gemini-3.8-flash, explicitly set thinking_level to "medium" or "high".
Here is how to replace thinking_budget with thinking_level="medium" in the official Python google-genai SDK:
from google import genai
from google.genai import types
client = genai.Client()
# Legacy Gemini 2.5 (Breaks or gets ignored on 3.x):
# thinking_config=types.ThinkingConfig(thinking_budget=1024)
response = client.models.generate_content(
model="gemini-3.5-flash-lite",
contents="Check inventory for SKU-992 and create a restock order if below 10 units.",
config=types.GenerateContentConfig(
thinking_config=types.ThinkingConfig(
thinking_level="medium" # Use "medium" or "high" for reliable tool calling
),
response_mime_type="application/json",
),
)
print(response.text)
And here is the equivalent update in the Node.js / TypeScript @google/genai SDK:
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
async function runAgentStep() {
const response = await ai.models.generateContent({
model: "gemini-3.8-flash",
contents: [
{
role: "user",
parts: [{ text: "Analyze the failed deployment logs and call rollback_service if needed." }],
},
],
config: {
thinkingConfig: {
// Replaces legacy thinkingBudget: 2048
thinkingLevel: "medium",
},
},
});
console.log(response.text);
}
runAgentStep();
3. temperature, top_p, and top_k Sampling Parameters Are Ignored
If your codebase passes temperature: 0.0, top_p: 0.9, or top_k: 40 to force deterministic extraction or control creativity on gemini-2.5-flash and gemini-2.5-pro, those parameters no longer take effect once traffic routes to gemini-3.5-flash-lite and gemini-3.8-flash.
Like other modern reasoning-first endpoints, Gemini 3.5 Flash-Lite and 3.8 Flash ignore legacy token-sampling knobs during generation. While leaving temperature: 0 in your payload usually will not throw a hard error by itself, any test suite or extraction pipeline that relies on temperature: 0 to prevent output variation will see wider variance after December 1. If you need strict, repeatable outputs for classification or data extraction, lock down the allowed values using enum fields inside response_schema rather than tuning temperature.
4. Missing thought_signature in Function Calls Throws HTTP 400
When a Gemini 3.x model emits a functionCall part with thinking enabled, the response includes a cryptographic thought_signature field on that part so the model can verify and resume its reasoning state on the next turn.
When you send the functionResponse back to the API in a multi-turn loop, you must include the prior assistant turn with its thought_signature intact. If your conversation history serializer, database layer, or OpenAI-compatible translation proxy strips unknown fields when reconstructing contents, the second turn of your tool call will fail with HTTP 400:
Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance.
We saw this exact failure earlier in the year across older builds of OpenCode (such as v1.1.21) and outdated Gemini CLI wrappers that rebuilt functionCall objects from scratch instead of preserving the raw Part payload returned by Google. For similar gateway and tool-calling troubleshooting on 3.x models, see our guide on fixing Gemini 3 Flash API errors.
To fix this in custom code, append the exact candidates[0].content object returned by the SDK directly into your conversation history array rather than manually constructing a new {"role": "model", "parts": [{"functionCall": ...}]} dictionary.
Do not use skip_thought_signature_validator in production. You may find forum posts or proxy workarounds suggesting that non-compliant clients can bypass the 400 error by passing the literal string "skip_thought_signature_validator" inside the thought_signature field. Do not do this: running scripts that inject skip_thought_signature_validator has triggered automated abuse detection and resulted in full Google Cloud account restrictions. Fix your message history serializer instead.
Audit Your Codebase with Grep and Complete the Migration
Before December 1 arrives, run a single grep (or ripgrep) command across your repositories to catch every hardcoded 2.5 model identifier, legacy thinking_budget config, and prefill pattern:
grep -rnE "gemini-2\.5-(flash|pro)|thinking_budget|thinkingBudget|\"role\":\s*\"model\"" ./src ./config
Once you have the list of matching files, work through this checklist to make sure your services survive both the December 1 redirect and the January 1 price change:
- Replace deprecated model strings explicitly: Change
gemini-2.5-flashtogemini-3.5-flash-lite(if you want the same $0.30/$2.50 price as of 2026-11-05) orgemini-3.8-flash(if you need full Flash capability). Changegemini-2.5-protogemini-3.8-flashorgemini-4-argondepending on whether you need Flash speed or Pro-level reasoning. - Keep
gemini-2.5-flash-liteonly where intentional: Verify whether anygemini-2.5-flash-litecalls are running on the Gemini Developer API (still supported) versus Vertex AI (already retired). - Swap
thinking_budgetforthinking_level: Remove integerthinking_budgetfields (especiallythinking_budget: 0in JSON mode) and setthinking_level: "medium"or"high"on every agent or tool-calling request targetinggemini-3.5-flash-lite. - Delete trailing
modelprefills: Ensure the final message incontentsalways hasrole: "user"orrole: "function"(tool response), and migrate JSON prefixes toresponse_schema. - Verify
thought_signatureround-tripping: Run a two-turn tool call againstgemini-3.5-flash-litein staging to confirm your state store preservesthought_signatureonfunctionCallparts. - Replace
ListModelshealth checks: Update readiness probes so they validate active 3.x model IDs rather than assumingGET /v1beta/models/gemini-2.5-flashreturning200 OKmeans generation will succeed.
If you are updating model IDs and testing endpoints across local coding agents like OpenAI Codex or Claude Code, or routing across multiple providers via SeedRouter, you can avoid hand-editing config files by using our free, open-source LLM API Config GUI for Windows and macOS. It lets you switch Base URLs, API keys, and target model strings from a clean desktop interface and includes a built-in connection tester to diagnose 400, 401, 403, 404, and 429 errors before you push config changes to production.