SunsetDiff

This model is no longer available

After a Gemini API model is shut down, the deprecations page says the endpoint is no longer available. The 404 sentence below was recorded for gemini-2.0-flash, which shut down June 1, 2026.

Error text

This model models/gemini-2.0-flash is no longer available. Please update your code to use a newer model for the latest features and improvements.

Quoted from GitHub issue google/adk-python#6010, checked October 20, 2026.

Google's deprecations page says that once a model is shutdown, it is completely turned off and the endpoint is no longer available. The October 22, 2026 rows are veo-3.1-lite-generate-preview, veo-3.1-generate-preview, veo-3.1-fast-generate-preview, and gemini-omni-flash-preview, with replacement gemini-omni-1.1-flash. SunsetDiff has not recorded this 404 sentence for those four ids. The Error text block is the message in https://github.com/google/adk-python/issues/6010 for models/gemini-2.0-flash. A different sentence, from https://github.com/googleapis/python-genai/issues/2087, was recorded while new API keys were blocked and the model was not yet shut down for everyone: This model models/gemini-2.0-flash is no longer available to new users. Please update your code to use a newer model for the latest features and improvements. Source: Gemini API deprecations, checked October 20, 2026.

Affected models

The quoted 404 was recorded for gemini-2.0-flash. The October 22, 2026 ids are the upcoming Gemini API shutdown.
Model idWhat the source says
gemini-2.0-flash Shut down June 1, 2026. The GitHub issue records the 404 for models/gemini-2.0-flash. Replacement on the deprecations page checked October 20, 2026: gemini-3.6-flash.
gemini-omni-flash-preview Shutdown date October 22, 2026. Replacement: gemini-omni-1.1-flash. The exact 404 sentence is not recorded here for this id.
veo-3.1-generate-preview Shutdown date October 22, 2026. Replacement: gemini-omni-1.1-flash.
veo-3.1-fast-generate-preview Shutdown date October 22, 2026. Replacement: gemini-omni-1.1-flash.
veo-3.1-lite-generate-preview Shutdown date October 22, 2026. Replacement: gemini-omni-1.1-flash.
gemini-3.6-flash Replacement named for gemini-2.0-flash on the deprecations page checked October 20, 2026.
gemini-omni-1.1-flash Replacement named for the October 22, 2026 Gemini API rows.

Fix

Raw SDK

Stop calling the retired model id. For gemini-2.0-flash, the deprecations page checked October 20, 2026 names gemini-3.6-flash. The October 22 rows name gemini-omni-1.1-flash. The sample is a generateContent call, which is the call in the GitHub issue. It is not a Veo video request.

Before

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -X POST \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'

After

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.6-flash:generateContent" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -X POST \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'

Source: Gemini API deprecations, checked October 20, 2026.

LiteLLM

LiteLLM's Gemini API route is the gemini/ prefix plus the model id. Change the id. The docs show gemini/gemini-2.0-flash as a Gemini API model string.

Python

import litellm
response = litellm.completion(
    model="gemini/gemini-3.6-flash",
    messages=[{"role": "user", "content": "Hello"}],
)

Source: LiteLLM Gemini provider, checked October 20, 2026.

Vercel AI SDK

generateText takes the model id from google(). Use the replacement id from the deprecations page.

TypeScript

import { google } from "@ai-sdk/google";
import { generateText } from "ai";

const { text } = await generateText({
  model: google("gemini-3.6-flash"),
  prompt: "Hello",
});

Source: AI SDK generateText, checked October 20, 2026.

Shutdown pages

Switch guides

More request errors

All request errors

Questions

Which Gemini API models shut down on October 22, 2026?

veo-3.1-lite-generate-preview, veo-3.1-generate-preview, veo-3.1-fast-generate-preview, and gemini-omni-flash-preview. The list is on Gemini API models shutting down October 22, 2026.

Is the 404 sentence verified for those four models?

No. It is verified in a GitHub issue for gemini-2.0-flash. The deprecations page says a shutdown turns the endpoint off. It does not print that 404 sentence.

Deprecation alerts

We email you before models shut down. Unsubscribe anytime.

Deprecation alert signup
Providers (optional)