A linocut of stepping stones crossing a bright blue channel: cracked ochre stones sink on the left, and smooth white stones curve away to a sunlit bank crowded with sunflowers
All posts

GPT-4o and GPT-4.1 API shutdown on January 14, 2027: how to migrate to gpt-6-luna

OpenAI removes GPT-4o and GPT-4.1 from the API on January 14, 2027. Migrate to gpt-6-luna: effort none, no temperature/top_p, re-test tools and cost.

OpenAI removes gpt-4o, gpt-4o-mini, gpt-4.1 and gpt-4.1-mini from its API on 14 January 2027, according to its deprecations page, and lists gpt-6-luna as the replacement for all four.

Luna reasons by default, so three things change in the request. OpenAI's migration guide says to remove temperature, top_p and top_logprobs whenever the reasoning effort is not none. Function tools on Chat Completions work only with effort none. And reasoning tokens count against the output cap. Start with reasoning_effort: "none" and no sampling parameters, then measure quality and cost per completed task before you accept a higher effort.

OpenAI facts were read on 15 October 2026. AIVAX facts come from the product code, the public model catalog and the maintained docs. We sent no live requests to OpenAI or to AIVAX managed models; where a claim rests on code reading or an offline run, the text says so.

Which OpenAI models shut down on 14 January 2027?

OpenAI notified developers using these models on 14 October 2026. Fine-tuned versions follow the same schedule as their base models.

Models removed from the OpenAI API on 14 January 2027, with the replacement OpenAI lists, as read on 2026-10-15
ModelSnapshots on the deprecations pageInput / output, USD per 1M tokensContext window / max output
gpt-4ogpt-4o-2024-08-06, gpt-4o-2024-11-202.50 / 10128,000 / 16,384
gpt-4o-minigpt-4o-mini-2024-07-180.15 / 0.60128,000 / 16,384
gpt-4.1gpt-4.1-2025-04-142 / 81,047,576 / 32,768
gpt-4.1-minigpt-4.1-mini-2025-04-140.40 / 1.601,047,576 / 32,768
gpt-6-luna (the listed replacement for all four)gpt-6-luna0.10 / 0.501,050,000 / 128,000

Four points limit what that table tells you:

  • Undated names. The page lists dated snapshots. OpenAI's model pages name those same snapshots as the defaults of the undated IDs, so plan as if gpt-4o and gpt-4.1 retire too.
  • Other shutdown dates. The gpt-4o-2024-05-13 snapshot and gpt-4.1-nano retire earlier, on 23 October, and the GPT-4o audio, TTS and transcription models have their own dates. Our guide to the 23 October wave lists them.
  • Notice period. OpenAI notified developers on 14 October, which is 92 days before the shutdown (91 from the day we read the page). OpenAI's policy on the same page promises at least six months of notice for generally available models, and The New Stack pointed out that this announcement gave about three months. Do not plan around an extension.
  • Scope. This covers OpenAI's own API. The AIVAX catalog lists Azure and OpenAI as providers for these models, and we did not check the Azure retirement date.

What changes in a request when you replace GPT-4o or GPT-4.1 with gpt-6-luna?

Six things change besides the model name. The table separates what OpenAI documents from what you should do about it.

Differences between the retiring models and gpt-6-luna, from OpenAI's model pages and migration guide
AreaGPT-4o and GPT-4.1gpt-6-lunaWhat to do
ReasoningNo reasoning stepEfforts none, low, medium (default), high, xhigh and maxSend reasoning_effort: "none" first. Raise it only for the requests that fail.
temperature, top_pAcceptedThe guide says to remove them, and top_logprobs, when effort is not none. On Chat Completions it also says to remove logprobsRemove them from code, config and gateways. Re-test outputs without them.
Function tools on Chat CompletionsAcceptedOnly with effort none. Otherwise use ResponsesKeep none or move the tool loop. See the fix for the tools error.
Output limitCaps visible textOpenAI's reasoning guide says the cap covers reasoning and visible tokens, so a low cap can end a response before any visible textRaise max_completion_tokens when effort is above none. OpenAI suggests reserving at least 25,000 tokens when you start experimenting with reasoning models.
Assistants and fine-tuningListed as supportedListed as not supportedOpenAI shut down the Assistants API on 26 August 2026; see the Assistants migration. A fine-tuned GPT-4o has no like-for-like retrain target on Luna.
Pricing detailsInput, cached input, outputAdds a cache-write rate of 1.25 times the input rate, and prompts above 272K input tokens cost 2 times the input rate and 1.5 times the output rate for the whole requestCheck long prompts and cache behavior. See why a prompt cache hit rate is low.

reasoning_effort: "none" is the least-change path because it keeps tools on Chat Completions. The guide's wording implies that the sampling parameters are accepted with none, but removing them is still the safe default. Luna is a different model, and we have not compared its outputs with GPT-4o's. Our post on how providers expose reasoning controls covers the other effort values.

The failure to design for is silent. One public project report, jobops-copilot #410, describes an earlier switch from gpt-5.4-nano to gpt-6-luna that changed one model string and took every live AI call down for six days while its health endpoint stayed green. Luna rejected temperature and top_p, and function tools needed Responses. The same project later added a canary that makes a real tool call. Make your health check send the parameters and tools your production traffic sends.

Does gpt-6-luna cost less than GPT-4o and GPT-4.1?

Per token, yes, at OpenAI's list prices: Luna's 0.10 input and 0.50 output undercut all four models above. Per request it depends on how many tokens the model generates, because reasoning tokens are billed as output (see how reasoning tokens are billed). This table shows how much output Luna can generate before one request costs what it cost on the old model.

Output tokens, reasoning included, that gpt-6-luna can generate before a request costs as much as on the retiring model
Retiring modelCost of the old request, USDLuna output tokens at equal cost
gpt-4o0.0055≈10,800
gpt-4.10.0044≈8,600
gpt-4.1-mini0.00088≈1,560
gpt-4o-mini0.00033≈460

Assumptions: each request has 1,000 input tokens and 300 visible output tokens, standard processing, no caching and a prompt under 272K tokens, at OpenAI's list prices above. These are calculated from list prices, so change the token counts to match your traffic. The gpt-4o-mini row is the tightest: if Luna at a reasoning effort above none generates more than about 460 tokens on a request that produced 300 visible tokens, the migration raises that request's cost even though the per-token price is lower. Read the output-token count in the usage of real requests before you raise the effort.

The AIVAX catalog listed @openai/gpt-6-luna at 0.11 input and 0.55 output per million tokens on 2026-10-15, about 10 percent above OpenAI's list price. It listed the four retiring models at OpenAI's rates. Treat the pricing page as the source for your budget and recompute the table with your own token counts.

How do you find every GPT-4o and GPT-4.1 reference?

Primary calls get migrated first. What survives is the code that runs rarely: retry and fallback lists, config defaults, eval and CI scripts, notebooks, scheduled jobs and fine-tuned model IDs stored in a database. This search matches the four names with their snapshot suffixes, provider prefixes such as openai/ and @openai/, and ft: fine-tune IDs:

rg -uu -nP '\bgpt-4o(?:-mini)?(?:-2024-\d\d-\d\d)?(?![\w.-])|\bgpt-4\.1(?:-mini)?(?:-2025-04-14)?(?![\w.-])' .

Against a 20-line sample, the pattern matched the 12 lines that name gpt-4o, gpt-4o-mini, gpt-4.1 or gpt-4.1-mini (dated, undated, prefixed and fine-tuned). It skipped gpt-4o-mini-tts, gpt-4o-audio-preview, gpt-4o-transcribe, gpt-4o-realtime-preview, gpt-4o-search-preview, gpt-4.1-nano, gpt-40 and gpt-4.1's lookalike gpt-4.10. The skipped names are different models, so check each against OpenAI's page. The pattern also matches any gpt-4o-2024-MM-DD snapshot, including gpt-4o-2024-05-13, which retires on 23 October. And -uu includes ignored and hidden files, so the search also reads node_modules and build output. Narrow the path if that is too noisy.

OpenAI also exposes the date itself. Its deprecations page says GET /v1/models returns an optional shutdown_date field, a YYYY-MM-DD string or null. This filter lists the models your key can see that have one:

curl -s https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  | jq -r '.data[] | select(.shutdown_date != null) | "\(.shutdown_date)  \(.id)"' | sort

We ran the jq filter on a local JSON fixture with five models and it printed the three that had a date, sorted. We did not call the live endpoint, so we cannot say which models your account list will show.

What does an AIVAX gateway do with temperature and top_p on gpt-6-luna?

In the AIVAX product code, @openai/gpt-6-luna carries a flag that marks it as not supporting temperature. The four retiring models carry a deprecated flag, and the public catalog showed all four as isDeprecating on 2026-10-15. We ran the request builder and the gateway validator offline. The behaviors below come from that run and from reading the code.

  • Saving a gateway. Validation rejects a gateway on Luna that sets Temperature: "The specified model @openai/gpt-6-luna does not supports temperature. Please, remove that parameter." The same gateway with TopP set passes validation.
  • Sending a request. With the caller setting temperature 0.2, top_p 0.9, reasoning_effort low, stop ["END"] and max_completion_tokens 64, the body built for Luna had no temperature and kept the other four. The body built for @openai/gpt-4.1 included temperature 0.2 as well. The code does not look at the effort when it drops temperature.
  • What we did not run. The HTTP route that lets a request override gateway values, and the mapping from a saved gateway to the client options, were not exercised, and no request reached an upstream.

The two parameters behave differently. A temperature set on a request is dropped without an error, even with effort none, so tuning you did with it stops having an effect and nothing tells you. A top_p is forwarded. OpenAI's guide says to remove it unless effort is none; we did not send that request, so we cannot tell you what error comes back. Remove both from gateways and clients.

A first request body to try against an AIVAX model (we did not send it):

{
  "model": "@openai/gpt-6-luna",
  "reasoning_effort": "none",
  "max_completion_tokens": 400,
  "messages": [{ "role": "user", "content": "Summarize this ticket in two sentences." }]
}

It differs from a GPT-4o body in two ways: it sets the effort explicitly, and it carries no temperature or top_p.

AIVAX can email an account that used a deprecated-flagged model in the previous 30 days. The alert is enabled by default and debounced to once every seven days. In the code, the message lists model names and a general warning without a shutdown date, so take the date from OpenAI's page. A gateway lets you change the model once for every client that calls it by name. We found no documented automatic substitution when a model is retired, so the replacement test stays yours.

How do you qualify the replacement before January?

  1. Freeze a request set. Collect real requests and their accepted outputs, including the longest prompts and the ones that call tools.
  2. Run Luna with effort none. Use the same tools, remove temperature and top_p, and compare parse failures, tool-call correctness, refusals, length and latency. If a schema sits behind the call, see where structured-output healing stops.
  3. Raise the effort for the failing slice only. Record the output tokens that usage reports for each request and check them against the break-even table.
  4. Test multi-turn behavior. A single-turn comparison can miss a model that stops calling a tool several turns in. Agentic Tests run a simulated user and a judge against a gateway, so you can point one at the old model and one at Luna; the Agentic Tests docs list the quotas.
  5. Send the hardest slice to a larger model if Luna fails it. OpenAI lists Luna even for gpt-4o and gpt-4.1, but the AIVAX catalog labels Luna "Medium" intelligence and gpt-4.1 "Highest"; those are catalog labels, not benchmark results. If Luna still fails your hardest requests at high effort, qualify gpt-6.1-sol on those requests only; OpenAI's guide says it supports neither none nor tool calling on Chat Completions, so it needs Responses for tools. The routing guide covers splitting traffic by complexity.
  6. Switch in one place and keep a canary. Change the gateway or the pinned ID once, keep the old value in version control until the shutdown, and run a scheduled call with your real tools and parameters.

Frequently asked questions

When does GPT-4o stop working in the OpenAI API?

On 14 January 2027, for the snapshots gpt-4o-2024-08-06 and gpt-4o-2024-11-20. The same date applies to gpt-4o-mini, gpt-4.1 and gpt-4.1-mini. The gpt-4o-2024-05-13 snapshot retires earlier, on 23 October 2026.

What replaces GPT-4o and GPT-4.1 in the API?

OpenAI's page lists gpt-6-luna for all four. That is OpenAI's recommendation, not proof that Luna fits your workload. Qualify it against your own requests.

Do fine-tuned GPT-4o and GPT-4.1 models stop too?

Yes. OpenAI says fine-tuned versions follow the same schedule as their base models. Luna's model page lists fine-tuning as not supported, and the deprecations page describes no automatic conversion, so check OpenAI's fine-tuning documentation for the models you can train on.

Can I keep temperature and top_p on gpt-6-luna?

Remove them. OpenAI's guide says to drop both when reasoning effort is not none, which implies they are accepted with none; we did not confirm that on Luna. Through an AIVAX integrated model, temperature is dropped from every Luna request and top_p is forwarded, and a gateway that sets Temperature on Luna fails validation.

Can I keep using GPT-4o after January 14, 2027?

OpenAI's page says some developers may be able to provision dedicated capacity for continued access after a shutdown date, and points to its sales team. It promises nothing, so migrate before the published date.

Does AIVAX switch GPT-4o to Luna automatically?

We found no documented automatic substitution for a retired model, so plan to change the model or gateway yourself. A gateway lets you do it in one place.

References