GrepBoard/Manuals
605 manuals ·

Gemini 2.5 Pro and Flash Now Route to Newer Models

·Tested on Debian 12.15 (Docker) · GNU grep 3.8 · Gemini API official docs · 2026-12·Test scope ↓·5 steps

From Dec 1, 2026, gemini-2.5-pro requests route to gemini-3.8-flash and gemini-2.5-flash to gemini-3.5-flash-lite, billed at the new model's rates.

If your code still says gemini-2.5-pro and calls keep succeeding after December 1, a different model may be answering without any error. The Gemini API deprecations page (read 2026-12-01) says that from 2026-12-01 all API requests to gemini-2.5-pro automatically route to gemini-3.8-flash, and all requests to gemini-2.5-flash route to gemini-3.5-flash-lite, billed at the new model's rates. The response and the bill change even if you keep the name, and requests affected by the changes in step [4] may also fail. Gemini API deprecations · Changelog, 2026-11-02

Requested nameFrom 2026-12-01Billed at
gemini-2.5-proRouted to gemini-3.8-flashGemini 3.8 Flash rates
gemini-2.5-flashRouted to gemini-3.5-flash-liteGemini 3.5 Flash-Lite rates
gemini-2.5-flash-liteNot deprecated. No shutdown date announcedUnchanged

This schedule comes from the Gemini Developer API docs. Schedules on other platforms such as Vertex AI were not checked, so read that platform's own docs. The 2.5 models are no longer selectable in AI Studio, and API access is limited to users who have used them before. For the 404 that projects without that history get, see Gemini no longer available to new users.

[1] Find both names in your code and config. A plain search also catches models with longer names. The test below plants several name shapes in a sample folder (/srv/app) inside a container: 10 Python, JavaScript, YAML and .env files.

Searching for gemini-2.5-flash as is gives this.

console
$ cd /srv/app$ grep -rn "gemini-2.5-flash" .
output
./app/main.py:5:r = client.models.generate_content(model="models/gemini-2.5-flash", contents="hi")./app/main.py:6:fast = 'gemini-2.5-flash'./app/main.py:7:cheap = "gemini-2.5-flash-lite"./app/media.py:1:IMG = "gemini-2.5-flash-image"./app/media.py:2:TTS = "gemini-2.5-flash-preview-tts"./app/media.py:4:LIVE = "gemini-2.5-flash-native-audio-preview-12-2025"./app/media.py:5:LITE_OLD = "gemini-2.5-flash-lite-preview-09-2025"./app/legacy.py:2:OLD_FLASH = "gemini-2.5-flash-preview-09-2025"./config/models.yaml:2:fallback: gemini-2.5-flash./config/models.yaml:3:batch: "gemini-2.5-flash-lite"./web/client.js:1:const m = 'gemini-2.5-flash';./deploy/windows.env:1:GEMINI_MODEL=gemini-2.5-flash./.env:1:GEMINI_MODEL=gemini-2.5-flash

Only 6 of the 13 lines are routed names. The other 7 are different models with -lite, -image, -preview-… or -native-audio-… suffixes. Match the name with its surroundings instead.

console
$ grep -rnIP --exclude-dir=node_modules --exclude-dir=.git '(?<![\w.-])gemini-2\.5-(pro|flash)(?![\w-]|\.\w)' .
output
./app/main.py:4:MODEL = "gemini-2.5-pro"./app/main.py:5:r = client.models.generate_content(model="models/gemini-2.5-flash", contents="hi")./app/main.py:6:fast = 'gemini-2.5-flash'./config/models.yaml:1:default: gemini-2.5-pro./config/models.yaml:2:fallback: gemini-2.5-flash./config/models.yaml:4:# gemini-2.5-pro was the default until June./web/client.js:1:const m = 'gemini-2.5-flash';./web/client.js:2:const url = `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent`;./deploy/windows.env:1:GEMINI_MODEL=gemini-2.5-flash./.env:1:GEMINI_MODEL=gemini-2.5-flash./.env.production:1:GEMINI_MODEL="gemini-2.5-pro"

(?<![\w.-]) skips names glued to a preceding letter, digit, . or -, and (?![\w-]|\.\w) skips names that continue, such as -lite. -P is GNU grep's Perl-regex option. The models/ prefix, single quotes, an unquoted end of line, the spot before :generateContent in a URL, the .env files, and windows.env with CRLF line endings (the \r does not touch the name) were all caught. A name in a comment matches too, so read the line before editing. node_modules is excluded on purpose; drop that option if your own code lives there.

This search misses two things. One is names built from pieces or read from the environment.

console
$ grep -rnIP --exclude-dir=node_modules 'gemini-2\.5-["{]' .$ echo ---$ grep -rnIE --exclude-dir=node_modules 'environ|getenv|process\.env' .
output
./app/dynamic.py:4:MODEL = "gemini-2.5-" + tier./app/dynamic.py:5:MODEL_F = f"gemini-2.5-{os.environ['TIER']}"---./app/dynamic.py:5:MODEL_F = f"gemini-2.5-{os.environ['TIER']}"./app/dynamic.py:6:MODEL_ENV = os.environ["GEMINI_MODEL"]

Those two lines escaped the first search because the name is split. The value of GEMINI_MODEL, read by MODEL_ENV, is invisible to a repository search if it lives outside the repository (deployment environment variables, a secret manager, another repository's config). The assembly search only covers the two shapes in the sample, so names joined in other ways can still slip through. The other miss is names that already shut down. gemini-2.5-pro-preview-06-05 and gemini-2.5-flash-preview-09-2025 are listed on the deprecations page as already shut down (2025-12-02 and 2026-02-17), which is a separate problem from this routing.

Some other 2.5 names run on their own schedules. On the same page, gemini-2.5-flash-image ends 2027-03-15, gemini-2.5-flash-native-audio-preview-12-2025 ends 2027-03-31, and gemini-2.5-flash-preview-tts and gemini-2.5-pro-preview-tts end 2026-12-18. Do not count them as part of the December 1 routing.

[2] Check which model is answering. A generateContent response has a modelVersion field, which the API reference describes as the model version used to generate the response. The docs do not say whether it shows the routed name when you request gemini-2.5-pro, and no API key was available to test it. Do not conclude that routing did not happen because the value matches your requested name. Log modelVersion from now on, and after switching names check that it matches the new one.

[3] Compare unit prices. The figures below come from the pricing page (read 2026-12-01): Standard tier, paid, USD per 1M tokens, with output including thinking tokens.

2.5 Pro against 3.8 Flash:

Itemgemini-2.5-progemini-3.8-flash
Input$1.25 (prompts up to 200k tokens) · $2.50 (over)$0.75 through 2026-12-31 · $1.50 from 2027-01-01
Output$10.00 (up to 200k) · $15.00 (over)$3.75 through 2026-12-31 · $7.50 from 2027-01-01

2.5 Flash against 3.5 Flash-Lite:

Itemgemini-2.5-flashgemini-3.5-flash-lite
Input$0.30 (text / image / video) · $1.00 (audio)$0.30 (text / image / video / audio)
Output$2.50$2.50

The 3.8 Flash price doubles on 2027-01-01. From then its input price ($1.50) is higher than the 2.5 Pro input price up to 200k ($1.25), and its output price ($7.50) is lower. Two models can use different numbers of thinking tokens for the same request, so unit prices alone do not predict the total, and the docs do not compare token usage between them. The actual routing and billing could not be checked without a key.

[4] List the parameter changes per target model. The two targets have different constraints, so do not carry one model's rules over to the other.

One change applies to both models. The changelog lists function calling and thought_signature validation as breaking changes. If your code makes function calls with generateContent and sends the conversation history itself, return each thought_signature from the model response exactly where you received it. According to the docs, Gemini 3 and 4 models return 400 if it is missing from the first functionCall in any step of the current turn. The official SDKs handle this value automatically, so start with code that builds requests itself or saves and resends the history. [Thought signatures (generateContent)](https://ai.google.dev/gemini-api/docs/generate-content/thought-signatures) · Function calling

gemini-2.5-pro to gemini-3.8-flash (the migration checklist in the 3.8 Flash guide):

ItemWhat the docs say
thinking_budgetReplace with thinking_level: low, medium (default) or high
thinking_level: minimalNot supported on 3.8 Flash and returns an error
temperature, top_p, top_kTo be removed. The 3.6 guide says the API ignores them and returns 400 in future model generations
candidate_countUnsupported in Gemini 3 and later. The docs do not say whether it errors or is ignored
Request whose last turn is a model turn (prefill)400
Multi-turnStandardize on server-side previous_interaction_id, remove prefill
Function callingPut multimodal assets inside the response payload, format inline instructions with \n\n, and with generateContent include call_id and name in every FunctionResponse

gemini-2.5-flash to gemini-3.5-flash-lite (the 3.5 Flash-Lite checklist in the 3.6 guide):

ItemWhat the docs say
thinking_budgetReplace with thinking_level. The default is minimal; leave it for bulk extraction and classification
Tool calls and multi-step reasoningRaise to medium or high so tool calls do not end early
Sampling values, candidate_count, prefill, function-calling auditSame rules as 3.6 Flash. Sampling values are currently ignored, and a last model turn returns 400

The minimal error is a 3.8 Flash constraint only; on Flash-Lite it is the default. The call_id and name item appears only in the 3.8 checklist (it is separate from the thought_signature 400 above). How a routed request meets these changes, for example whether a request that keeps thinking_budget really fails, is not stated: the deprecations page only says to review the migration guide before December 1. For the three sampling values in detail, see Gemini 4 temperature and top_p are ignored.

[5] Name the new model explicitly, evaluate, then deploy. The order:

1. Change the names from step [1] to gemini-3.8-flash or gemini-3.5-flash-lite and fix the parameters as in step [4]. If the routing target does not fit the workload, you can pick a different model. 2. Run a representative set of requests under the new name and compare response format, length and token usage. For function calling, include multi-step requests and check that none return 400. After December 1 the 2.5 names already go to the new models, so the only old answers to compare against are ones you saved earlier. 3. Deploy, then watch the model entries on the bill and your modelVersion log for a few days.

Rollback is described only as far as the docs confirm. The deprecations page gives no way to stay on 2.5 Pro or Flash after December 1, and reverting a deploy that names the new model just puts you back in the same auto-routed state; it does not return you to the old model. If the new name is the problem, switching to another current model name is the rollback. Keeping the name in one config value turns that change into one line.

#gemini-api#gemini-2.5-pro#gemini-2.5-flash#deprecation#model-routing