Skip to content
Nilay Kabariya

Entry No.049·AI·Updated ·5 min read

"No longer available to new users": Gemini 2.5 Flash fix

New Gemini API keys get a 404 on 2.5 Flash and Pro. Which model names answer instead, tested, and why December 1 quietly moves old keys to Flash-Lite.

What changed on Nov 8, 2026: Called 13 model names on v1 and v1beta with a new key; the 'not found for API version' cases now have their own post.

The error, verbatim

Jump to the fix ↓
{
  "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. We recommend you to use the Interactions API (https://ai.google.dev/gemini-api/docs/get-started).",
    "status": "NOT_FOUND"
  }
}

The fix that worked

Change the model name to a current one:

model: 'gemini-3.6-flash'
Not it? Every cause, tested ↓

Tested on

@google/genai
2.27.0; 3.0.0 (November 7)
API key
new, free tier (AI Studio)
Node / OS
24.14.0 / Windows 11 Pro
Date
October 7, 2026 (re-checked October 11, October 29 and November 7; Google's shutdown dates checked November 5)

This isn’t your code, and it isn’t your key’s permissions. Google has retired the 2.x models for keys and projects that didn’t use them before. That’s why the same code keeps working on a colleague’s old key and fails on yours, or works on your laptop and fails in a new deployment with a fresh key.

I called every older model name with a brand-new key. There are three different messages, depending on how old the model is:

Model Message
gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-lite 404 “no longer available to new users”
gemini-2.0-flash, gemini-2.0-flash-lite 404 “no longer available” (gone for everyone)
gemini-1.5-flash, gemini-1.5-pro 404 “is not found for API version v1beta, or is not supported for generateContent”

Each 404 for a 2.x model names its own replacement:

You asked for The error suggested
gemini-2.5-flash gemini-3.8-flash
gemini-2.5-pro gemini-3.1-pro-preview
gemini-2.5-flash-lite gemini-3.5-flash-lite
gemini-2.0-flash gemini-3.8-flash
gemini-2.0-flash-lite gemini-3.5-flash-lite

The model list doesn’t warn you

If you check ai.models.list() first, you’ll still find gemini-2.5-flash, gemini-2.5-pro and gemini-2.5-flash-lite in it, listed as supporting generateContent. Then the call 404s. So “it’s in the list” doesn’t mean your key can use it: only a real call tells you.

On @google/genai 3.0.0, preview and -latest names 404 too

@google/genai 3.0.0 (November 6, 2026) sends requests to API version v1 instead of v1beta. With the same key on November 7, three names that 2.27.0 still reached returned a 404 on 3.0.0, including the gemini-3.1-pro-preview that Google’s own error suggests for gemini-2.5-pro:

models/gemini-3.1-pro-preview is not found for API version v1, or is not supported for generateContent.

gemini-flash-latest and gemini-flash-lite-latest failed the same way. gemini-3.8-flash, gemini-3.6-flash and gemini-3.5-flash-lite worked on both versions. If your 404 says “is not found for API version” rather than “no longer available”, the name itself is the problem: which Gemini names don’t exist, tested on v1 and v1beta.

Set the API version back to v1beta, in code:

const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY, apiVersion: 'v1beta' });

or with the environment variable 3.0.0 added: GOOGLE_GENAI_API_VERSION=beta.

The fix

Change the model name. These worked with the new free key:

const res = await ai.models.generateContent({
  model: 'gemini-3.6-flash', // or 'gemini-3.5-flash-lite'
  contents: 'hi',
});

To stop this happening at the next retirement, you can use the moving alias instead of a version number. gemini-flash-lite-latest answered, and the response’s modelVersion showed it was serving gemini-3.5-flash-lite:

const res = await ai.models.generateContent({ model: 'gemini-flash-lite-latest', contents: 'hi' });
console.log(res.modelVersion); // gemini-3.5-flash-lite

The cost of an alias: the model behind it changes without notice, so output and pricing can shift under you. Log modelVersion so you can see when it does.

Do you have to switch to the Interactions API?

Every one of these 404s ends with “We recommend you to use the Interactions API”. That’s a suggestion, not the cause. On October 29, generateContent still answered with gemini-3.6-flash and gemini-3.5-flash-lite, so you don’t have to rewrite your calls to fix the 404.

Switching APIs without changing the model doesn’t help either. With @google/genai 2.27.0, ai.interactions.create() on gemini-2.5-flash returned the same error:

404 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.

The model name is the fix, whichever API you use. If you do move to the Interactions API, the same SDK has it, and the reply text is in output_text:

const r = await ai.interactions.create({ model: 'gemini-3.6-flash', input: 'hi' });
console.log(r.output_text);

Don’t jump straight to the suggested model

The 404 for gemini-2.5-flash says to use gemini-3.8-flash. Every time I tried it that evening, it returned 503 “This model is currently experiencing high demand” or timed out, and gemini-flash-latest did the same. Three weeks later, on October 29, both still returned that 503. Meanwhile, older models kept answering. The newest model is the busiest one. Test the replacement before you ship it.

And for the Pro suggestion (gemini-3.1-pro-preview): on the free tier its quota is 0, so switching to it turns your 404 into a 429. That one is covered in Gemini API 429 RESOURCE_EXHAUSTED: why your limit is 0.

On December 1, old keys change too

If your old key still runs gemini-2.5-flash today, it won’t fail on December 1, 2026. It will quietly answer with a different model. Google’s deprecations page, as I read it on November 5, 2026, lists December 1, 2026 as the shutdown date for both 2.5 Flash and 2.5 Pro, and says requests after that are routed automatically:

Your code asks for From December 1, 2026, it gets Billed as
gemini-2.5-flash gemini-3.5-flash-lite Flash-Lite
gemini-2.5-pro gemini-3.8-flash 3.8 Flash
gemini-2.5-flash-lite no change announced (“not deprecated”)

Two things stand out. First, 2.5 Flash moves to a Lite model, a smaller tier than the gemini-3.8-flash that the 404 suggests. Answers from code that keeps the old name can get shorter or weaker with no error at all. Second, gemini-2.5-flash-lite is listed as not deprecated, yet my new key got the same “to new users” 404 for it on October 7, 11 and 29.

I haven’t been able to test the routing itself: it starts on December 1, and it applies to old keys, which I don’t have.

What didn’t work

How this was tested

A free Google AI Studio key on October 7, 2026, re-run with the same key on October 11 and October 29 (the October 29 run added the Interactions API calls) (a new one: it got the “to new users” 404), with @google/genai 2.27.0 on Node 24.14.0 (Windows 11). Every model was called once with a one-word prompt and maxOutputTokens: 1. The model list came from ai.models.list() with the same key. I didn’t have an older key to confirm that the 2.5 models still work for existing users. That part is what the error message itself says (“to new users”), not something I saw. Google retires models on its own schedule, so check the date above.

The code for every case above is public, so you can run it yourself: gemini-429 in nk-repro.

— N.K., end of entry No.049

Useful? Pass it on:Post on XFollow @EmotionalMatter

Related entries

  1. No.059

    OpenAI Oct 23 model shutdown: the 404, list, replacements

    gpt-3.5-turbo, gpt-4, o1, o3-mini and more stopped working on October 23, 2026. The real error, tested after the shutdown, and a check that misleads.

    > NotFoundError: 404 The model `gpt-3.5-turbo` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations

    AI4 min
  2. No.096

    Gemini "model is not found for API version v1beta": the fix

    Gemini 404: model not found for API version v1beta or v1. I called 13 names on both: which don't exist, why v1 never helps, and the SDK 3.0 trap.

    > models/gemini-3-flash is not found for API version v1beta, or is not supported for generateContent. Call ModelService.ListModels to see the list of available models and their supported methods.

    AI5 min
  3. No.048

    Gemini API 429 RESOURCE_EXHAUSTED: why your limit is 0

    Gemini's 429 hides three different limits, and one of them never resets. Each hit on purpose with a free key, plus the 503 high demand error.

    > {

    AI5 min
  4. No.060

    Claude "temperature is deprecated for this model" (400)

    Switching to Claude Sonnet 5.5, Haiku 5.5 or Opus 4.7 breaks code that sets temperature, even temperature: 0. Every case tested, in Node and Python.

    > BadRequestError: 400 {"type":"error","error":{"type":"invalid_request_error","message":"`temperature` is deprecated for this model."}}

    AI4 min

tip: paste the exact error text