SunsetDiff

Vercel AI SDK: where a deprecated model id lives

In the Vercel AI SDK, the OpenAI model id is the string you pass to openai(). That factory uses the Responses API, and it has been the default since AI SDK 5. openai.chat() stays on Chat Completions. Change the string when the id in the table shuts down.

Last reviewed . Publisher: SunsetDiff.

Steps

  1. Find the factory call. Look for openai('...'), openai.chat('...'), or openai.responses('...'). The string is the model id.
  2. Read the shutdown table. Match that string to a row. The date is the record's shutdown date.
  3. Swap the string. Pass the official replacement id to the same factory.
  4. Keep GPT-6 tools on Responses. The OpenAI guide says to use the Responses API for GPT-6 tool calling. openai.chat() does not do that.
  5. Check the id. Check the id with lookup JSON, the MCP check_model tool, or a status badge before you ship the new string.

Where the model id lives

The AI SDK OpenAI guide creates a language model with openai('model-id'). The example string on that page is gpt-6-astra. generateText and streamText take that model object.

The provider reads the credential from the OPENAI_API_KEY environment variable. This page does not show a key.

The guide does not document a fallback list. Ordered backups are on the LiteLLM and OpenRouter sections of the swap guide.

TypeScript, from the AI SDK OpenAI guide

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

const { text } = await generateText({
  model: openai("gpt-6-astra"),
  prompt: "Hello",
});

Source: AI SDK OpenAI guide , checked October 25, 2026.

How to pin or swap it

The string you pass is the id that is sent. There is no separate alias field on this factory. Replace gpt-4o, or whichever id you pass, with the official replacement from the table.

openai('id'), openai.responses('id'), and openai.chat('id') are three factories. Swap the string inside the factory you already call, unless you also need to change which API is used.

Source: AI SDK OpenAI guide , checked October 25, 2026.

GPT-6 function tools

The guide says the default OpenAI model factory, openai('model-id'), uses the Responses API. Since AI SDK 5 that is the default unless you select openai.chat. Use openai.chat('model-id') when a custom base URL implements Chat Completions and not Responses.

The same guide says to use the Responses API for GPT-6 tool calling. It also says GPT-6 Astra and GPT-6.1 Sol do not support reasoning effort none. GPT-6 Sol and GPT-6 Luna do. The error pages are the write-up for the Chat Completions failure.

Chat Completions factory, from the AI SDK OpenAI guide

import { openai } from "@ai-sdk/openai";

const model = openai.chat("gpt-6-astra");

Sources: AI SDK OpenAI guide , Using GPT-6 , checked October 25, 2026.

Upcoming shutdowns in this dataset

gpt-4.1-2025-04-14, gpt-4.1-mini-2025-04-14, gpt-4o-2024-08-06, gpt-4o-2024-11-20, and gpt-4o-mini-2024-07-18 shut down on 2027-01-14. The official replacement on these rows is gpt-6-luna.

gpt-4.1, gpt-4.1-mini, gpt-4o, and gpt-4o-mini have no shutdown date on their own records. A request that sends the short id is not the dated snapshot row. Open the model page before you treat the short id as shut down.

Rows are upcoming OpenAI chat models in the gpt-4o, gpt-4.1, gpt-4-turbo, gpt-4, and gpt-3.5-turbo families. Audio, realtime, transcribe, and search ids are not in this table. The same id on another platform is in the other-platforms column. The full calendar is upcoming shutdowns. Provider wording for the shutdown day is on what happens on shutdown day.

5 upcoming OpenAI chat shutdowns from this dataset.
Shutdown Provider Model Replacement Other platforms
2027-01-14
source, checked 2026-10-26
OpenAI GPT-4.1 (gpt-4.1-2025-04-14)
gpt-4.1-2025-04-14
gpt-6-luna
Switch guide: gpt-6-luna
Azure OpenAI: shuts down on 2027-10-14
2027-01-14
source, checked 2026-10-26
OpenAI GPT-4.1 mini (gpt-4.1-mini-2025-04-14)
gpt-4.1-mini-2025-04-14
gpt-6-luna
Switch guide: gpt-6-luna
Azure OpenAI: shuts down on 2027-10-14
2027-01-14
source, checked 2026-10-26
OpenAI GPT-4o (gpt-4o-2024-08-06)
gpt-4o-2024-08-06
gpt-6-luna
Switch guide: gpt-6-luna
Azure OpenAI: shuts down on 2027-10-01
2027-01-14
source, checked 2026-10-26
OpenAI GPT-4o (gpt-4o-2024-11-20)
gpt-4o-2024-11-20
gpt-6-luna
Switch guide: gpt-6-luna
Azure OpenAI: shuts down on 2027-04-14
2027-01-14
source, checked 2026-10-26
OpenAI GPT-4o mini (gpt-4o-mini-2024-07-18)
gpt-4o-mini-2024-07-18
gpt-6-luna
Switch guide: gpt-6-luna
Azure OpenAI: shuts down on 2027-10-01

Detect a dying model

These checks read SunsetDiff. They do not call the model provider.

Related SunsetDiff pages

Other frameworks

All frameworks

Questions

Does openai('gpt-4o') call Chat Completions?

No. The AI SDK OpenAI guide says openai('model-id') uses the Responses API. openai.chat('model-id') is the Chat Completions factory.

Is there a fallback argument?

The OpenAI guide does not document a fallback list. Use the swap guide for LiteLLM fallbacks or OpenRouter's models array.

Where do the dates in the shutdown table come from?

From SunsetDiff model records for upcoming OpenAI chat ids in the gpt-4o, gpt-4.1, gpt-4-turbo, gpt-4, and gpt-3.5-turbo families. The sentence above the table is built from those records when the site is built. Each row links the provider source stored on that record.

How do I check one model id from this page?

Open lookup JSON and replace gpt-4o with your id. Or call check_model on the MCP server. Or use a status badge. No API key.