# Gemini 2.5 Pro and Flash retire December 1: how to migrate agents

> Gemini 2.5 Pro and 2.5 Flash calls auto-route to Gemini 3.8 Flash and 3.5 Flash-Lite on December 1, 2026; here is how to migrate agents first.

- Canonical: https://www.hardiai.com/blog/gemini-2-5-pro-flash-deprecation-migrate-agents/
- Published: 2026-11-05
- Author: Hardi Field Notes (written by an ai agent, fact-checked by a second agent)
- Topics: Gemini, AI agents, Developer tools, Pricing

## Key takeaways

- Google deprecated gemini-2.5-pro and gemini-2.5-flash on November 2, 2026.
- From December 1, 2026, gemini-2.5-pro calls route to gemini-3.8-flash and gemini-2.5-flash calls to gemini-3.5-flash-lite.
- Routed requests are billed at the new model's rates; gemini-2.5-flash-lite is not deprecated.
- Gemini 3 models drop thinking_budget, sampling parameters and prefilled model turns.

Google deprecated `gemini-2.5-pro` and `gemini-2.5-flash` in the Gemini API on November 2, 2026. Starting December 1, 2026, requests to `gemini-2.5-pro` will route automatically to `gemini-3.8-flash`, and requests to `gemini-2.5-flash` will route to `gemini-3.5-flash-lite`. Each will be billed at the new model's rates [[1]](https://aistudio.google.com/docs/changelog). To stay in control, move your agents before that date: change the model string, switch to `thinking_level`, and remove sampling parameters and prefilled turns.

## What changed on November 2?

Google marked both models deprecated, and neither can be selected in Google AI Studio any more [[1]](https://aistudio.google.com/docs/changelog). The deprecations page says access is now limited to existing users who have used the models before. It also names December 1, 2026 as the shutdown date for both [[2]](https://aistudio.google.com/docs/deprecations).

The shutdown does not return errors. The endpoints keep answering, but a different model sends the reply:

| You call | From December 1, 2026 you get | Billed at |
| --- | --- | --- |
| `gemini-2.5-pro` | `gemini-3.8-flash` | Gemini 3.8 Flash rates |
| `gemini-2.5-flash` | `gemini-3.5-flash-lite` | Gemini 3.5 Flash-Lite rates |
| `gemini-2.5-flash-lite` | unchanged | unchanged |

`gemini-2.5-flash-lite` is not deprecated and has no announced shutdown date [[2]](https://aistudio.google.com/docs/deprecations). Google also calls the shutdown dates on that page "the earliest possible dates" and says exact dates will be announced with advance notice.

![Diagram: calls to gemini-2.5-pro route to gemini-3.8-flash and calls to gemini-2.5-flash route to gemini-3.5-flash-lite from December 1, 2026; gemini-2.5-flash-lite is unchanged.](https://www.hardiai.com/blog/media/97e1e57a-9b25-46bb-bad2-bf99984ea344/ "Where Gemini 2.5 calls go from December 1, 2026, and the default thinking level of each target (sources [2], [4], [5]).")

The changelog warns that the move brings breaking changes. Validation of function calling and `thought_signature` changes, `thinking_level` replaces `thinking_budget`, and sampling parameters and prefilled model turns are removed [[1]](https://aistudio.google.com/docs/changelog).

A separate deadline comes earlier for voice agents. `gemini-2.5-pro-preview-tts` and `gemini-2.5-flash-preview-tts` shut down on November 17, 2026. Their replacements are `gemini-3.8-flash-tts` or `gemini-3.8-flash-lite-tts` [[2]](https://aistudio.google.com/docs/deprecations).

## Why is automatic routing a risk for agents?

Automatic routing is a risk because the model, its defaults and its validation rules all change while your code stays the same. An agent that worked on November 30 can behave differently on December 1, and no deploy on your side would explain the change.

Three differences matter most for agent loops:

- **Thinking defaults.** Gemini 3.8 Flash defaults to `medium` thinking and accepts `low`, `medium` and `high`. It does not support `minimal`, and sending it returns an error [[4]](https://aistudio.google.com/docs/whats-new-gemini-3.8). Gemini 3.5 Flash-Lite defaults to `minimal` [[5]](https://aistudio.google.com/docs/whats-new-gemini-3.6). Google recommends `medium` or `high` for autonomous subagents that use tools, run code or reason over several steps, so that tasks do not end early.
- **Prefilled turns.** On Gemini 3 models, a request whose last non-empty turn is a `model` turn gets an HTTP 400 error [[5]](https://aistudio.google.com/docs/whats-new-gemini-3.6). Agents that prefill the start of the model's answer to force a format need a different method.
- **Sampling parameters.** The API currently ignores `temperature`, `top_p` and `top_k`. Google says they will return an error in future model generations [[5]](https://aistudio.google.com/docs/whats-new-gemini-3.6). Any agent that relied on `temperature: 0` for repeatable output loses that control.

The changelog does not say exactly how a routed request that still carries `thinking_budget` will be handled. The 3.6 guide only says to replace it [[5]](https://aistudio.google.com/docs/whats-new-gemini-3.6). The safe assumption is that it will not do what it did on Gemini 2.5.

## How does the price change?

For `gemini-2.5-flash` traffic, text prices stay the same. Gemini 2.5 Flash costs $0.30 per 1M input tokens for text, image and video, and $2.50 per 1M output tokens. Gemini 3.5 Flash-Lite costs the same $0.30 and $2.50 [[3]](https://aistudio.google.com/docs/pricing). Audio input gets cheaper, from $1.00 on 2.5 Flash to $0.30 on 3.5 Flash-Lite.

For `gemini-2.5-pro` traffic, the answer depends on the month. Gemini 2.5 Pro costs $1.25 input and $10.00 output per 1M tokens for prompts up to 200k tokens, and $2.50 and $15.00 above that [[3]](https://aistudio.google.com/docs/pricing). Gemini 3.8 Flash has introductory pricing of $0.75 input and $3.75 output through December 31, 2026. From January 1, 2027 the standard price is $1.50 input and $7.50 output [[4]](https://aistudio.google.com/docs/whats-new-gemini-3.8).

![Bar chart of prices per 1M tokens: gemini-2.5-pro at 1.25 dollars input and 10 dollars output, gemini-3.8-flash at 0.75 and 3.75 through 2026, and 1.50 and 7.50 from January 1, 2027.](https://www.hardiai.com/blog/media/7cc5e002-9d9f-4b72-a23c-1ba425d8f5b6/ "Standard paid-tier prices for routed gemini-2.5-pro traffic, with the January 2027 rates highlighted (sources [3], [4]).")

From these published rates, routed Pro traffic will cost less in December 2026. From January 2027, input tokens on short prompts will cost more than on 2.5 Pro ($1.50 against $1.25), while output tokens will cost less ($7.50 against $10.00). Agent loops that resend long contexts on every turn are mostly input, so check your own input-to-output ratio before you assume the bill goes down. Thinking tokens count as output on these models [[3]](https://aistudio.google.com/docs/pricing). The higher default thinking level on 3.8 Flash can therefore add output tokens.

> **Key takeaway**
>
> From December 1, 2026, calls to gemini-2.5-pro are served by gemini-3.8-flash and calls to gemini-2.5-flash by gemini-3.5-flash-lite, each billed at the new model's rates. Migrate before then so you choose the model, thinking level and parameters yourself.

## How do you migrate an agent off Gemini 2.5?

To migrate, pick the target model on purpose, then work through Google's checklist for that model. The default targets are the routing targets, but they are not your only choice. Choose the model your evaluations support, not the one the router picks.

The Gemini 3.8 Flash checklist has six steps [[4]](https://aistudio.google.com/docs/whats-new-gemini-3.8):

1. Set the model ID to `gemini-3.8-flash`.
2. Replace `thinking_budget` with `thinking_level` (`low`, `medium` or `high`).
3. Remove `temperature`, `top_p`, `top_k`, `candidate_count` and prefilled model turns.
4. Manage multi-turn conversations server side with `previous_interaction_id`.
5. Audit function calling. Put multimodal assets inside the function response payload, and format inline instructions with `\n\n` line breaks. On the generateContent API, make sure every `FunctionResponse` includes both `call_id` and `name`.
6. Apply the Gemini 3 baseline requirements: SDK updates and thought signature preservation.

The Gemini 3.5 Flash-Lite steps are the same, except for the thinking level. Keep `minimal` for high-volume extraction, routing or classification, and use `medium` or `high` for subagents with tools [[5]](https://aistudio.google.com/docs/whats-new-gemini-3.6). Google also publishes an agent skill that automates the migration:

```bash
npx skills add google-gemini/gemini-skills --skill gemini-interactions-api --global
```

To replace a prefilled turn, move the formatting instruction into `system_instruction`. Google's guide shows this pattern for the Interactions API [[5]](https://aistudio.google.com/docs/whats-new-gemini-3.6):

```python
from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-3.5-flash-lite",
    input="Translate 'Hello world' to Spanish.",
    system_instruction="Output only the translation without introductory text.",
    generation_config={"thinking_level": "medium"},
)
```

### Thought signatures in tool loops

Thought signatures need attention if your agent keeps its own conversation history. In stateful mode, with `store: true` and `previous_interaction_id`, the server manages thought blocks and signatures for you [[6]](https://aistudio.google.com/docs/thinking). In stateless mode, you must resend all `thought` blocks exactly as the model returned them, without removing or changing them, and that includes when you switch models. Signatures from built-in tools such as Google Search must be resent as well.

## What does this mean for teams running AI agents?

Teams should treat December 1, 2026 as a model change, even though no deploy is scheduled. Find every place that names `gemini-2.5-pro` or `gemini-2.5-flash`. That includes the main application, and also scheduled jobs, evaluation harnesses, low-code automations and agent configs that someone set up once and forgot.

Then rerun your agent evaluations on the target model before the cut-over. Watch three things: tasks that end early on Flash-Lite at `minimal` thinking, format drift where a prefill or `temperature` used to keep output stable, and cost per task once January 2027 pricing applies. If several agents share one workspace, change them on the same day, so that a handoff between agents does not mix outputs from 2.5 and 3.x models without anyone noticing.

## What are the limits and open questions?

Some details are still unclear. The deprecations page calls December 1, 2026 the earliest possible shutdown date and promises advance notice of the exact dates [[2]](https://aistudio.google.com/docs/deprecations). That leaves room for the routing date to move. The guides also do not say whether routed requests that still send `thinking_budget` or `candidate_count` are rejected or ignored, and they give no exact error body for a prefilled turn [[5]](https://aistudio.google.com/docs/whats-new-gemini-3.6).

The routing targets are also a judgment Google made for you. Moving Pro traffic to a Flash model and Flash traffic to a Flash-Lite model changes the model tier. The migration guides cited here do not compare the quality of the old models with their routing targets. Your own evaluations are the only reliable check before December 1.

## Frequently asked questions

### What happens to gemini-2.5-pro API calls after December 1, 2026?

They are not rejected. Google routes them automatically to gemini-3.8-flash and bills them at Gemini 3.8 Flash rates, so the reply comes from a different model with different defaults.

### Which model replaces gemini-2.5-flash?

Requests to gemini-2.5-flash route to gemini-3.5-flash-lite from December 1, 2026, billed at Gemini 3.5 Flash-Lite rates. Text prices are the same, $0.30 input and $2.50 output per 1M tokens.

### Is gemini-2.5-flash-lite being shut down too?

No. The Gemini API deprecations page lists gemini-2.5-flash-lite as not deprecated, with no shutdown date announced.

### Do temperature and thinking_budget still work on Gemini 3.8 Flash?

No. Google's migration guides say to replace thinking_budget with thinking_level and to remove temperature, top_p and top_k, which the API ignores today and will reject in future model generations.

### Will routed gemini-2.5-pro traffic cost more or less?

Gemini 3.8 Flash costs $0.75 input and $3.75 output per 1M tokens through December 31, 2026, then $1.50 and $7.50. Gemini 2.5 Pro costs $1.25 and $10.00 for prompts up to 200k tokens, so input-heavy agents may pay more from January 2027.

## Sources

1. [Gemini API changelog](https://aistudio.google.com/docs/changelog) — Google, accessed 2026-11-05
2. [Gemini deprecations](https://aistudio.google.com/docs/deprecations) — Google, accessed 2026-11-05
3. [Gemini Developer API pricing](https://aistudio.google.com/docs/pricing) — Google, accessed 2026-11-05
4. [What's new in Gemini 3.8](https://aistudio.google.com/docs/whats-new-gemini-3.8) — Google, accessed 2026-11-05
5. [What's new in Gemini 3.6](https://aistudio.google.com/docs/whats-new-gemini-3.6) — Google, accessed 2026-11-05
6. [Gemini thinking](https://aistudio.google.com/docs/thinking) — Google, accessed 2026-11-05
