Your gemini-2.5-pro calls switch models on December 1 without an error. What to grep, what breaks, and what search grounding will cost
From December 1, Google routes every Gemini API request for gemini-2.5-pro to gemini-3.8-flash and every request for gemini-2.5-flash to gemini-3.5-flash-lite, billed at the new models' rates. The response stays a 200, so no alert fires. Two grep patterns that find the affected model strings (and skip the 2.5 names that are not redirected), the request shapes the new models reject or silently ignore, the token prices that change twice in five weeks, and the line most likely to move your bill: search grounding goes from per prompt with 1,500 free a day to per search query with 5,000 free a month. A script that measures your real query count on the new model today.
On December 1, a request to gemini-2.5-pro will still return a 200. The answer will come from a different model. Google's changelog entry of November 2 puts it in one sentence: "Effective December 1, 2026, 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 entry for gemini-2.5-flash reads the same way, with gemini-3.5-flash-lite as the target.
The people this reaches are, by construction, production users. Since September 18, Google has limited 2.5 API access to projects that "have actively used them in the past", and neither model can be selected in AI Studio any more. On that same September 18, the changelog also said the 2.5 models "are not deprecated and will continue to be served until further notice through the API." That notice lasted six weeks. A model labelled "not deprecated" is not a reason to leave it unpinned from your own calendar.
Nothing in your monitoring is built to notice a redirect. Status codes stay green, and the only visible failure is one request shape described further down. Everything else changes quietly: the model, the sampling behaviour, the default reasoning depth, the token price and, for anyone using Google Search grounding, the way searches are billed. You have until the end of November to make the switch yourself, in a diff you can test, instead of having it made for you.
These pages document the Gemini Developer API (API keys from AI Studio). They say nothing about Vertex AI. If you reach 2.5 through Vertex, check Vertex's own model lifecycle page and do not assume either way.
Find every string the redirect will catch
Two model names are affected, and several close relatives are not. gemini-2.5-flash-lite is explicitly "not deprecated". The image, live and TTS variants are separate model codes. A plain search for gemini-2.5-flash matches all of them, so anchor the pattern to the end of the name:
grep -rnE --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=.venv \
'gemini-2\.5-(pro|flash)([^-a-z0-9.]|$)' .
On a test tree this matched "gemini-2.5-pro" in Python, models/gemini-2.5-flash, GEMINI_MODEL=gemini-2.5-flash in a .env file and model: gemini-2.5-pro in YAML, and skipped gemini-2.5-flash-lite, gemini-2.5-flash-image and gemini-2.5-flash-preview-tts. Run it in the repo, then again wherever model names live outside the repo: deployment environment variables, a prompt-management tool, a database row, an n8n or Zapier node. Code that builds the name (f"gemini-{version}-pro") will not match any pattern, so search for gemini- as well if your codebase does that.
The TTS previews have an earlier and harder deadline. The deprecations page lists gemini-2.5-flash-preview-tts and gemini-2.5-pro-preview-tts with a shutdown date of November 17, 2026 and gemini-3.8-flash-tts or gemini-3.8-flash-lite-tts as replacements. That row says shutdown, not routing, so plan for failed requests twelve days from now:
grep -rnE --exclude-dir=node_modules --exclude-dir=.git 'gemini-2\.5-(pro|flash)-preview-tts' .
Then list what those same files send. Most of the breaking changes live in request parameters, and this narrows the search to files that mention a redirected model:
grep -nE 'temperature|top_[pk]|topP|topK|thinking_?[bB]udget|candidate_?[cC]ount|google_?[sS]earch|"role": *"model"' \
$(grep -rlE --exclude-dir=node_modules --exclude-dir=.git 'gemini-2\.5-(pro|flash)([^-a-z0-9.]|$)' .)
If the generation config sits in a different file from the model string, run the second pattern across the whole repo instead.
Search grounding: from per prompt to per query
If any of those calls use the google_search tool, this section is the one that changes the invoice. The pricing page bills the two generations differently:
| Gemini 2.5 (today) | Gemini 3 and newer (after the redirect) | |
|---|---|---|
| Unit | per grounded prompt | per search query the model runs |
| Free allowance | 1,500 per day | 5,000 per month, shared across all Gemini 3 models |
| After that | $35 per 1,000 prompts | $14 per 1,000 queries |
| Default daily cap | none listed | 1,500 search requests per day per project |
The Google Search guide is explicit about the unit: one prompt that leads the model to search for "UEFA Euro 2024 winner" and "Spain vs England Euro 2024 final score" "counts as two billable uses of the tool for that request." Empty queries are not counted.
A redirected request is "billed at Gemini 3.8 Flash rates" (or 3.5 Flash-Lite rates), and the search line on both of those pricing rows is the per-query one. Take a news-monitoring job that sends 1,200 grounded prompts a day to gemini-2.5-flash. Today that sits under the 1,500 free prompts, so search costs $0. At one query per prompt, the same job becomes 36,000 queries a month: 31,000 above the free 5,000, so $434 a month. At two queries per prompt, as in Google's own example, it is 2,400 queries a day, which passes the default 1,500 daily cap, and $938 a month for the queries that get through.
The number that decides this is how many queries the new model runs for your prompts, and you can measure it now: call the target model by name today. This script sends a sample of your real prompts with grounding on, counts the distinct non-empty queries in grounding_metadata.web_search_queries, and projects a month of search and token cost. It uses the google-genai Python SDK (field names checked against version 2.34.0):
# search_cost_check.py
# Usage: python search_cost_check.py prompts.txt <model> <prompts_per_day> [thinking_level]
import sys
from google import genai
from google.genai import types
PRICES = { # USD per 1M tokens, standard tier, Gemini API pricing page (5 Nov 2026)
"gemini-2.5-pro": [(1.25, 10.00)], # prompts <= 200k tokens
"gemini-2.5-flash": [(0.30, 2.50)], # text input
"gemini-3.8-flash": [(0.75, 3.75), (1.50, 7.50)], # December, then from 1 Jan 2027
"gemini-3.5-flash-lite": [(0.30, 2.50)],
}
prompts_file, model, per_day = sys.argv[1], sys.argv[2], int(sys.argv[3])
config = types.GenerateContentConfig(tools=[{"google_search": {}}])
if len(sys.argv) > 4: # thinking_level errors on 2.5 models; pass it only for the 3.x target
config.thinking_config = types.ThinkingConfig(thinking_level=sys.argv[4])
prompts = [line.strip() for line in open(prompts_file) if line.strip()]
client = genai.Client() # reads GEMINI_API_KEY
queries = tok_in = tok_out = 0
for p in prompts:
r = client.models.generate_content(model=model, contents=p, config=config)
gm = r.candidates[0].grounding_metadata
queries += len({q for q in (gm.web_search_queries or []) if q.strip()}) if gm else 0
u = r.usage_metadata
tok_in += (u.prompt_token_count or 0) + (u.tool_use_prompt_token_count or 0)
tok_out += (u.candidates_token_count or 0) + (u.thoughts_token_count or 0)
n = len(prompts)
month = per_day * 30
q_day = queries / n * per_day
print(f"{model}: {queries / n:.2f} search queries per prompt -> {q_day:,.0f} per day")
if model.startswith("gemini-2.5"):
search = max(0, per_day - 1500) * 30 * 35 / 1000 # billed per grounded prompt
else:
search = max(0, q_day * 30 - 5000) * 14 / 1000 # billed per search query
if q_day > 1500:
print(" over the default 1,500 search requests/day: ask for more quota now")
print(f" search grounding per month: ${search:,.2f}")
for i, (pin, pout) in enumerate(PRICES[model]):
tokens = (tok_in * pin + tok_out * pout) / 1e6 / n * month
print(f" tokens per month{' from 1 Jan' if i else ''}: ${tokens:,.2f}")
Run it twice on the same 30 to 50 prompts, once on the model you use today and once on the target:
python search_cost_check.py prompts.txt gemini-2.5-flash 1200
python search_cost_check.py prompts.txt gemini-3.5-flash-lite 1200 medium
We ran it against a mocked client to check the arithmetic and the SDK fields, not against the live API, so the per-prompt query count is the number your own run has to supply. Thought and tool-prompt tokens are counted on the expensive side on purpose. If the projection passes 1,500 queries a day, the guide's route for a higher cap is AI Studio's rate-limit page, under the generate_content_search_request_paid limit. Ask before December, not on the morning the job starts failing.
If the projected bill is too high, the levers are in your hands: ground fewer prompts (only the ones that need fresh facts), or move this one job to gemini-2.5-flash-lite, which is outside the redirect, still billed per prompt, and has "No shutdown date announced". That buys time, not a permanent home.
What the new models do with your old requests
Google's migration guides for 3.8 Flash and 3.5 Flash-Lite list the changes. Sorted by how you would find out about them:
| Your request today | After the redirect | Change it to |
|---|---|---|
Ends with a prefilled model turn (e.g. "Translation:" or { to force JSON) | HTTP 400. "If the last non-empty turn in the request is a model turn, the API returns a 400 error." | A system_instruction ("Output only the translation") or structured output |
temperature, top_p, top_k | Accepted and "ignored", no error. A temperature: 0 pipeline stops being repeatable without telling you | Remove them; Google suggests explicit rules in the system instruction. Background in our post on the sampler removals |
thinking_budget / thinkingBudget | "Replace thinking_budget with the string enum thinking_level." What a redirected call does with a budget is not documented | thinking_level in the same commit as the model string: the generateContent reference says thinkingLevel on earlier models "results in an error" |
gemini-2.5-flash used as an agent or tool caller | 3.5 Flash-Lite defaults to minimal thinking | "medium" or "high" for subagents and tool calls, "to prevent premature tool termination". Leave minimal for extraction and classification |
| Any thinking level on 3.8 Flash | "minimal is not supported on Gemini 3.8 Flash" and returns an error | low, medium (default) or high |
candidate_count | "unsupported in Gemini 3 and later" | One request per candidate you need |
| A function-calling loop that rebuilds history by hand | The guides list "function calling and thought_signature validation" as a breaking change. In generateContent, signatures ride on functionCall parts | Append response.candidates[0].content as returned, so signatures survive, and give every FunctionResponse its call_id and name |
The first row is the only failure you will see on December 1 without looking for it. The rest change output quality or cost while every request succeeds, which is why the side-by-side run above matters more than reading the list. Send the same 30 to 50 production prompts to the old model and the target with your eval or a plain diff, and fix what moves while you can still choose the target yourself. Pro users are moving from a Pro model to a Flash model, and the 3.8 guide says it "can use more tokens on longer running and complex tasks, by design", so check output quality and token counts, not only errors.
The token price changes twice
| Input / output per 1M tokens (standard) | |
|---|---|
gemini-2.5-pro, prompts up to 200k | $1.25 / $10.00 |
gemini-2.5-pro, prompts over 200k | $2.50 / $15.00 |
gemini-3.8-flash, December 2026 | $0.75 / $3.75 |
gemini-3.8-flash, from January 1, 2027 | $1.50 / $7.50 |
gemini-2.5-flash (text) | $0.30 / $2.50 |
gemini-3.5-flash-lite | $0.30 / $2.50 |
A redirected Pro call gets cheaper on December 1 and changes again 31 days later, when input costs 20% more than 2.5 Pro did for prompts under 200k and output costs 25% less. Output includes thinking tokens on every row. Budget on the January line: a December invoice at the introductory rate will make the switch look cheaper than it is. For 2.5 Flash text, the per-token price does not move; the change there is the default reasoning depth and, if you ground, the search line.
The dates between now and January
- November 9 and 16, 16:00 to 18:00 UTC: GitHub brownouts for
pull_request_targetin public repositories, ahead of blocking it by default on December 2 (GitHub changelog). Bots that comment on pull requests from forks, AI reviewers included, can depend on that trigger; during a brownout their runs fail. - November 17:
gemini-2.5-flash-preview-ttsandgemini-2.5-pro-preview-ttsshut down. - December 1:
gemini-2.5-proandgemini-2.5-flashroute to the new models and their prices. - January 1, 2027:
gemini-3.8-flashdoubles to its standard price, and so does its context caching.
The same pattern ran on October 8, when gemini-3.7-flash and gemini-3.5-flash began routing to their successors the day the deprecation was posted. For anything you call by a fixed model ID, the Gemini changelog is worth a calendar reminder: a redirect only ever announces itself there. For the wider picture of where Gemini sits against the alternatives, the Claude vs Gemini comparison and the Gemini tool page carry the current lineup.
Get the next post when it ships
One email on Sunday with the new post and a short list of what shipped that week — new guides, tool updates, and a couple of links worth reading.