SunsetDiff

Replacement for GPT-4o mini (gpt-4o-mini-2024-07-18): what changes when you switch

The official replacement is gpt-6-luna. GPT-4o mini (gpt-4o-mini-2024-07-18) shuts down on 2027-01-14 per OpenAI's deprecation page (checked 2026-11-12). The published context window changes from 128,000 tokens on gpt-4o-mini-2024-07-18 to 1,050,000 tokens on gpt-6-luna.

This is the canonical diff. Model page · Replacement page · OpenAI

Request errors

Request breaking changes

These rows are from the breaking-changes list. JSON · CSV

1rule that apply here.
Old settingWhat happensFixSource
function tools on POST /v1/chat/completions when reasoning_effort is not noneFunction tools with reasoning_effort are not supported for gpt-6-luna in /v1/chat/completionsUse the Responses API for function tools, or set reasoning_effort to none on Chat Completions.GPT-6 Luna model page, checked 2026-10-20 · Error page

GPT-4o mini (gpt-4o-mini-2024-07-18) to gpt-6-luna

Some values not published Checked 2026-11-12.

Price per 1M tokens

Price comparison. Example monthly cost for 10M input tokens and 2M output tokens. Labeled example, not a bill.
FieldOldNewChange
Input Not published $0.1 Not published
Output Not published $0.125 Not published
Cached input Not published $0.5 Not published
Example monthly cost Not published $1.25 Example only

Context and max output

Token limits
LimitOldNewChange
Context window 128,000 1,050,000 +720.3% (higher)
Max output 16,384 128,000 +681.3% (higher)

Capabilities that differ

No differing capability values are published for both models.

Endpoint changes

API changes

Code

python before
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
    model="gpt-4o-mini-2024-07-18",
    messages=[{"role": "user", "content": "Hello"}],
    tools=[{
        "type": "function",
        "function": {
            "name": "get_weather",
            "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},
        },
    }],
)
python after
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
    model="gpt-6-luna",
    messages=[{"role": "user", "content": "Hello"}],
    reasoning_effort="none",
    tools=[{
        "type": "function",
        "function": {
            "name": "get_weather",
            "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},
        },
    }],
)
typescript before
import OpenAI from "openai";
const client = new OpenAI();
const response = await client.chat.completions.create({
  model: "gpt-4o-mini-2024-07-18",
  messages: [{ role: "user", content: "Hello" }],
  tools: [{
    type: "function",
    function: {
      name: "get_weather",
      parameters: { type: "object", properties: { city: { type: "string" } }, required: ["city"] },
    },
  }],
});
typescript after
import OpenAI from "openai";
const client = new OpenAI();
const response = await client.chat.completions.create({
  model: "gpt-6-luna",
  messages: [{ role: "user", content: "Hello" }],
  reasoning_effort: "none",
  tools: [{
    type: "function",
    function: {
      name: "get_weather",
      parameters: { type: "object", properties: { city: { type: "string" } }, required: ["city"] },
    },
  }],
});
curl before
curl https://api.openai.com/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini-2024-07-18","messages":[{"role":"user","content":"Hello"}],"tools":[{"type":"function","function":{"name":"get_weather","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}]}'
curl after
curl https://api.openai.com/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-6-luna","messages":[{"role":"user","content":"Hello"}],"reasoning_effort":"none","tools":[{"type":"function","function":{"name":"get_weather","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}]}'

Checklist

  1. Read the shutdown date for gpt-4o-mini-2024-07-18 on the linked official page.
  2. Point your requests at gpt-6-luna.
  3. Re-check price, context, and parameters on the provider pages linked here.
  4. Ship the change before the published shutdown date.

Questions

What is the replacement for GPT-4o mini (gpt-4o-mini-2024-07-18)?

The official replacement is gpt-6-luna. GPT-4o mini (gpt-4o-mini-2024-07-18) shuts down on 2027-01-14 per OpenAI's deprecation page (checked 2026-11-12). The published context window changes from 128,000 tokens on gpt-4o-mini-2024-07-18 to 1,050,000 tokens on gpt-6-luna.

Is gpt-6-luna cheaper than gpt-4o-mini-2024-07-18?

A full price comparison is not published. One or both prices are missing from the official pages we checked.

Does gpt-6-luna have a bigger context window than gpt-4o-mini-2024-07-18?

Yes. The context window changes from 128,000 to 1,050,000 tokens.