SunsetDiff

LlamaIndex: where a deprecated model id lives

LlamaIndex puts the OpenAI model id in OpenAI(model=...). Settings.llm is the global default when a call does not pass its own LLM. The OpenAI integration page does not document a Responses API switch. If you swap in a GPT-6 id that needs Responses for function tools, read the error pages before you send tools.

Last reviewed . Publisher: SunsetDiff.

Steps

  1. Find the constructor. Search for OpenAI(model=...) and for Settings.llm. A query engine can also take llm= and override the global setting.
  2. Read the shutdown table. Match the string to a dated row. A short alias can be a different record from the snapshot.
  3. Swap the string. Pass the official replacement to model, and assign that client to Settings.llm if the rest of the app uses the global default.
  4. Read the tool pages. This library's OpenAI page does not document a Responses switch. Use the function-tool pages before you send tools to a GPT-6 id.
  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 using-LLMs page says you specify a model by passing model to the LLM constructor. Its example is OpenAI(model="gpt-4o-mini").

The OpenAI integration page repeats that call, including OpenAI(model="gpt-4o") and OpenAI(model="gpt-4o-mini"). It says the constructor uses the OPENAI_API_KEY environment variable by default. This page does not show a key.

The API reference says the model parameter is the name of the OpenAI model to use, and that its default is DEFAULT_OPENAI_MODEL. The customizing-LLMs page says the default LLM is OpenAI's gpt-3.5-turbo. This page does not claim those two defaults are the same string.

The Settings page says Settings.llm is the global LLM when a component does not receive one. The customizing page shows Settings.llm = OpenAI(...) and a local override, query_engine = index.as_query_engine(llm=llm).

Constructor, from the using-LLMs page

from llama_index.llms.openai import OpenAI

llm = OpenAI(model="gpt-4o-mini")

Global default, from the Settings page

from llama_index.core import Settings
from llama_index.llms.openai import OpenAI

Settings.llm = OpenAI(model="gpt-4o-mini")

Sources: LlamaIndex using LLMs , LlamaIndex OpenAI integration , LlamaIndex OpenAI API reference , LlamaIndex customizing LLMs , LlamaIndex Settings , checked October 25, 2026.

How to pin or swap it

Change the model string to the official replacement on the shutdown row. If Settings.llm is set, change that assignment too, or a path that omits llm= will keep the old global id.

The OpenAI integration page does not document a router alias or a fallback list. A second model is a second OpenAI(model=...) call in your code.

Sources: LlamaIndex OpenAI integration , LlamaIndex Settings , checked October 25, 2026.

GPT-6 function tools

The LlamaIndex OpenAI integration page does not document a Responses API switch. Do not add a flag this page did not find there.

OpenAI's Using GPT-6 guide says GPT-6 Astra and GPT-6.1 Sol tool calling requires the Responses API, and that GPT-6 Sol and GPT-6 Luna accept function tools on Chat Completions only with reasoning effort none. If the replacement id is one of those models, read the error pages and the Responses API guide before you send tools.

Sources: LlamaIndex OpenAI integration , 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

What is the LlamaIndex argument for an OpenAI model id?

model, on llama_index.llms.openai.OpenAI. The using LLMs page shows OpenAI(model="gpt-4o-mini"). The global default is Settings.llm.

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.