Replace GPT-4o for Classification by Jan. 14, 2027: Prompt gpt-6-luna or Distill a Small Model You Own
GPT-4o and GPT-4o mini shut down in 58 days. A prompted small model is the quick fix; distilling GPT-4o's labels into an open-weight classifier is the route that cannot be deprecated. Here is how to test both.
To replace GPT-4o with a cheaper small model for classification, switch to gpt-6-luna with reasoning set to none and the output locked to an enum of your labels, then prove it on your own data before January 14, 2027, when OpenAI shuts down GPT-4o and GPT-4o mini. At list prices that cuts the cost of a typical label from about $1.35 per 1,000 to about $0.055. Claude Haiku 5.5 and Gemini 2.5 Flash-Lite cost about the same and are worth testing alongside it. The other route is not closed, despite OpenAI shutting fine-tuning to new users: you can distill the GPT-4o labels you already have into a small open-weight classifier you host yourself, and OpenAI's own services agreement explicitly permits that for in-house classifiers.
What is shutting down, and what OpenAI says to use instead
OpenAI's deprecations page, in a notice dated October 14, 2026, sets January 14, 2027 as the shutdown date for the gpt-4o-2024-08-06 and gpt-4o-2024-11-20 snapshots of GPT-4o, for gpt-4o-mini-2024-07-18, and for GPT-4.1 and GPT-4.1 mini. For all of them it names one replacement: gpt-6-luna. The older gpt-4o-2024-05-13 snapshot is already gone; it shut down on October 23, 2026.
Two of the cheap models that teams would reach for next are gone or going. gpt-4.1-nano shut down on October 23, 2026, with gpt-5.6-luna as its replacement, and gpt-5-nano shuts down on December 11, 2026, 24 days from now. OpenAI lists gpt-6-luna as gpt-5-nano's replacement too, and the gpt-5-nano model page tells new cost-sensitive workloads to start there.
| Model | Shutdown | OpenAI's replacement | Price per 1M tokens (in / out) |
|---|---|---|---|
| GPT-4o | Jan 14, 2027 | gpt-6-luna | $2.50 / $10.00 |
| GPT-4o mini | Jan 14, 2027 | gpt-6-luna | $0.15 / $0.60 |
| gpt-5-nano | Dec 11, 2026 | gpt-6-luna | $0.05 / $0.40 |
| gpt-4.1-nano | Oct 23, 2026 (done) | gpt-5.6-luna | retired |
| gpt-6-luna | none announced | n/a | $0.10 / $0.50 |
| gpt-5.6-luna | none announced | n/a | $0.20 / $1.20 |
Prices are OpenAI's standard list prices as of November 17, 2026.
Fine-tuned models do not escape the schedule. The deprecations page says fine-tuned versions "follow the same shutdown schedule as their underlying base models," so a GPT-4o mini classifier fine-tuned on GPT-4o outputs stops working on January 14 as well. The pricing page adds that "Fine-tuning is closed to new users," and the gpt-6-luna model page lists the fine-tuning endpoint as unsupported. That is why the usual advice today is not to plan on fine-tuning. It is right about OpenAI, and wrong about distillation in general.
How a small prompted model replaces GPT-4o
Classification is one of the few jobs where a small model can do almost everything a large one does, because the answer is one word from a fixed list. The cost of a label is dominated by the input you send, and the output should be a handful of tokens. Two settings decide whether that holds.
The first is reasoning. gpt-6-luna defaults to medium reasoning effort and accepts none. OpenAI's reasoning guide says reasoning tokens "are not visible via the API" but "are billed as output tokens." A model that thinks before every label pays output prices for text you never see. Set effort to none, and read usage.output_tokens_details.reasoning_tokens on a sample of responses to confirm it is zero. Claude Haiku 5.5 also thinks by default, at medium effort, and Anthropic's thinking docs say it accepts thinking: {type: "disabled"} at effort high or below. Gemini 2.5 Flash-Lite is the exception: Google's thinking docs list its thinking as off by default, and its pricing page notes that the output price includes thinking tokens if you turn it on.
The second is the output format. All three vendors support JSON Schema with an enum. OpenAI's structured outputs guide says it "constrains completed, non-refusal model output to your supplied JSON Schema," which means every completed answer is one of your labels and nothing else. The same guide warns that your code "still needs to handle refusals, incomplete responses, and API errors," so log those as their own outcome rather than mapping them to a default class.
Haiku 5.5's list price matches Luna's, $0.10 in and $0.50 out per million tokens, for prompts up to 100,000 tokens; above that it rises to $0.50 and $2.50, which is why Anthropic writes "from." Anthropic also says Haiku 5.5's tokenizer counts the same text as about 30 percent more tokens than Haiku 4.5's, so equal list prices do not guarantee equal bills. Flash-Lite charges $0.10 in and $0.40 out. Anthropic commits to keeping Haiku 5.5 available until at least October 7, 2027; Google's deprecations page says Gemini 2.5 Flash-Lite has "No shutdown date announced." OpenAI's deprecations page lists no shutdown for Luna.
Build the eval from the GPT-4o traffic you already have
OpenAI's model-optimization track puts it plainly: "You can't measure a model's performance or compare it to other models if you don't have a way to evaluate it." For a classification migration, the eval is cheap to build because GPT-4o has already labelled your traffic. The steps:
- Sample a few hundred to a few thousand real inputs from production logs, stratified so that every class appears, including the rare ones.
- Have a person check a sample of GPT-4o's labels, at least 100 to 200 items with every rare class represented. GPT-4o is your reference, not ground truth, and its mistakes are the ones a student will copy.
- Hold out a test split now and never train or tune prompts on it.
- Run every candidate on the test split with identical instructions.
- Report overall accuracy, per-class recall and the confusion matrix, not accuracy alone.
The last step matters because small models fail where it hurts. A model can match GPT-4o's overall accuracy and still miss half of a class that makes up 2 percent of traffic. scikit-learn's classification_report gives precision, recall and F1 per class with a macro average that weights every class equally, and confusion_matrix shows which label each class gets mistaken for. Agree a pass mark before you look at results, for example no class losing more than a few points of recall against the human-checked labels.
Here is a minimal harness for the OpenAI candidate. The same loop works for Haiku 5.5 (with output_config.format and thinking disabled) and Flash-Lite (with a JSON schema in its response format). Check the parameter names against the current SDKs before running it.
import json, time
from openai import OpenAI
from sklearn.metrics import classification_report, confusion_matrix
client = OpenAI()
LABELS = [...] # your class names
INSTRUCTIONS = "..." # fixed text first, so it can be cached
def label_with_luna(text):
t0 = time.perf_counter()
resp = client.responses.create(
model="gpt-6-luna",
reasoning={"effort": "none"},
input=[{"role": "system", "content": INSTRUCTIONS},
{"role": "user", "content": text}],
text={"format": {"type": "json_schema", "name": "label", "strict": True,
"schema": {"type": "object", "additionalProperties": False,
"required": ["label"],
"properties": {"label": {"type": "string", "enum": LABELS}}}}},
)
latency = time.perf_counter() - t0
hidden = resp.usage.output_tokens_details.reasoning_tokens
return json.loads(resp.output_text)["label"], latency, resp.usage, hidden
def report(y_true, y_pred):
print(classification_report(y_true, y_pred, labels=LABELS, digits=3, zero_division=0))
print(confusion_matrix(y_true, y_pred, labels=LABELS))
Record latency per call and report the 50th and 95th percentiles, and sum the usage fields to get a real cost per 1,000 labels including any hidden reasoning tokens. If you want public data to test the harness before pointing it at production, BANKING77 has 77 intents, 10,003 training and 3,080 test examples under a CC BY 4.0 licence, and is a good stress test for rare, easily confused classes. AG News, with four news categories and about 7,600 test rows, is the easy contrast case.
A head-to-head of GPT-4o, gpt-6-luna, Haiku 5.5, Flash-Lite and a distilled small classifier on the same classification data has not been measured, and that includes per-class recall and latency. The harness above is how to measure it on yours.
Why distillation still works without OpenAI
OpenAI's optimization track describes distillation as transferring "a stronger model's behavior to a smaller 'student' model" and lists "Distill the larger model's outputs to a smaller model" as a step. What closed is OpenAI's hosted version of that step. Nothing stops you running it on open weights.
For classification the student does not need to be a language model at all. An encoder with a classification head, the kind Hugging Face's text-classification guide fine-tunes with AutoModelForSequenceClassification, outputs a probability for every class in one forward pass and never generates text. ModernBERT-base, at 149 million parameters with Apache 2.0 weights and an 8,192-token context, is one such base; its model card says to "fine-tune it following standard BERT fine-tuning recipes." A model like this has no shutdown date, because you hold the file.
The legal question is narrower than it is for generative models. Section 3.3(e) of OpenAI's Services Agreement (version v.010126) bars using Output to develop models that compete with OpenAI "except for a Permitted Exception." The agreement defines that exception as using Output to "develop artificial intelligence models primarily intended to categorize, classify, or organize data (e.g., embeddings or classifiers), if these models are not distributed or made commercially available to third parties." An internal classifier trained on GPT-4o's labels sits inside that wording. Publishing the weights, or selling the classifier as a product, does not; get legal review before you do either.
Training on GPT-4o labels plus the human-corrected sample looks like this:
from datasets import Dataset
from transformers import (AutoTokenizer, AutoModelForSequenceClassification,
TrainingArguments, Trainer)
BASE = "answerdotai/ModernBERT-base"
id2label = dict(enumerate(LABELS)); label2id = {v: k for k, v in id2label.items()}
# rows: GPT-4o labels from logs, with human corrections overriding where they exist
train = Dataset.from_list([{"text": t, "label": label2id[l]} for t, l in train_rows])
val = Dataset.from_list([{"text": t, "label": label2id[l]} for t, l in val_rows])
tok = AutoTokenizer.from_pretrained(BASE)
enc = lambda b: tok(b["text"], truncation=True)
model = AutoModelForSequenceClassification.from_pretrained(
BASE, num_labels=len(LABELS), id2label=id2label, label2id=label2id)
args = TrainingArguments(output_dir="student", learning_rate=2e-5,
per_device_train_batch_size=16, num_train_epochs=2,
eval_strategy="epoch", save_strategy="epoch",
load_best_model_at_end=True)
Trainer(model=model, args=args, train_dataset=train.map(enc, batched=True),
eval_dataset=val.map(enc, batched=True), processing_class=tok).train()
The hyperparameters are the settings from the Hugging Face guide's example, a starting point rather than a tuned recipe. Score the student on the same held-out test split as the API models. How many GPT-4o-labelled examples a student needs to match GPT-4o has not been measured; train on increasing slices of your data, say 1,000, 5,000 and 20,000 items, and stop when per-class recall stops improving. If your logs are thin, more labels are cheap while GPT-4o still answers: 20,000 items at 500 input and 10 output tokens cost about $13.50 through OpenAI's batch tier.
The student's probabilities also give you a safety valve. Send any item whose top score falls below a threshold to gpt-6-luna or Haiku 5.5, and let the student handle the rest. Pick the threshold on the validation split so that the items the student keeps meet your pass mark; what share of traffic that leaves for the larger model depends on your data.
Parsec, a small-language-model lab, offers a managed form of this loop. Its inference page describes a cycle of tracing production requests, building datasets and evaluations the customer approves, training with SFT or LoRA and serving, with requests sent to a closed frontier model when the customer's model is not confident; it says "Weights: Yours. Download them." It publishes no price for the service, its pages give no licence or file format for those weights, and its only code example uses the Anthropic SDK rather than OpenAI's. Separately, Parsec's MIT-licensed open-jev repository includes an SDK, openjev-sdk, for fine-tuning small "decision models," among them one called TOD; its README does not present it as part of Parsec's coding-agent product.
What it costs, and where owning wins
Take a workload of 500 input tokens and 10 output tokens per label at standard list prices, with no caching. GPT-4o costs $1.35 per 1,000 labels and GPT-4o mini $0.081. gpt-6-luna and Haiku 5.5 cost $0.055, Flash-Lite $0.054 and gpt-5.6-luna $0.112. Batch tiers halve these at all three vendors if you can wait for results, and cached instructions cost $0.01 per million input tokens on Luna and Haiku 5.5, though Anthropic only caches prompts of at least 512 tokens.
The reasoning setting can undo most of that. If Luna, left at its default effort, spent 300 hidden reasoning tokens per label, an illustrative figure rather than a measured one, each label would carry another $0.15 per 1,000, taking the total to $0.205.
At 10 million labels a month, GPT-4o costs $13,500 and gpt-6-luna $550, or $275 in batch. An owned student's cost is mostly hosting. On Hugging Face Inference Endpoints, which bill by the minute while an endpoint runs, one always-on NVIDIA T4 costs $0.50 an hour, about $365 a month, and one single-vCPU Intel Sapphire Rapids instance costs $0.033 an hour, about $24. Against Luna at $0.055 per 1,000, the T4 breaks even at about 6.6 million labels a month and the CPU instance at about 438,000, provided a single replica carries the traffic. Whether it does, and at what p95 latency, has not been measured. Training is small next to either: an assumed two hours on a T4 is $1. Engineering time and retraining when your classes change are the real costs, and they are why a prompted model wins at low volume even when the student is free to run.
Bottom line
If you label fewer than a few hundred thousand items a month, or your classes change often, move to gpt-6-luna with reasoning off and enum outputs, test Haiku 5.5 and Flash-Lite on the same eval, and pick on per-class recall rather than price, since the three cost about the same. If you label millions a month, or a class that matters keeps failing under prompting, distill GPT-4o's labels into an open-weight encoder you host, keep a prompted model as the fallback for low-confidence items, and keep the weights in-house to stay within OpenAI's classifier exception. Either way, record GPT-4o's labels on a held-out test set this week, because after January 14 there is nothing left to compare against.
Sources
- OpenAI, Deprecations: https://developers.openai.com/api/docs/deprecations
- OpenAI, API pricing: https://developers.openai.com/api/docs/pricing
- OpenAI, GPT-6 Luna model page: https://developers.openai.com/api/docs/models/gpt-6-luna
- OpenAI, GPT-5.6 Luna model page: https://developers.openai.com/api/docs/models/gpt-5.6-luna
- OpenAI, GPT-5 nano model page: https://developers.openai.com/api/docs/models/gpt-5-nano
- OpenAI, Reasoning guide: https://developers.openai.com/api/docs/guides/reasoning
- OpenAI, Structured outputs guide: https://developers.openai.com/api/docs/guides/structured-outputs
- OpenAI, Model optimization track: https://developers.openai.com/tracks/model-optimization
- OpenAI Services Agreement (v.010126): https://cdn.openai.com/osa/openai-services-agreement.pdf
- Anthropic, Claude Haiku 5.5 overview: https://platform.claude.com/docs/en/models/haiku-5-5/overview
- Anthropic, Models overview: https://platform.claude.com/docs/en/about-claude/models/overview
- Anthropic, Pricing: https://platform.claude.com/docs/en/about-claude/pricing
- Anthropic, Thinking: https://platform.claude.com/docs/en/build-with-claude/thinking
- Anthropic, Structured outputs: https://platform.claude.com/docs/en/build-with-claude/structured-outputs
- Google, Gemini API pricing: https://aistudio.google.com/docs/pricing
- Google, Gemini thinking: https://aistudio.google.com/docs/thinking
- Google, Gemini structured output: https://aistudio.google.com/docs/structured-output
- Google, Gemini deprecations: https://aistudio.google.com/docs/deprecations
- Hugging Face, Text classification guide: https://huggingface.co/docs/transformers/tasks/sequence_classification
- Hugging Face, ModernBERT-base: https://huggingface.co/answerdotai/ModernBERT-base
- Hugging Face, Inference Endpoints pricing: https://huggingface.co/docs/inference-endpoints/pricing
- BANKING77 dataset: https://huggingface.co/datasets/PolyAI/banking77
- AG News dataset: https://huggingface.co/datasets/fancyzhx/ag_news
- scikit-learn, classification_report: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.classification_report.html
- scikit-learn, confusion_matrix: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.confusion_matrix.html
- Parsec, Home: https://parseclab.ai
- Parsec, Inference: https://parseclab.ai/inference/
- Parsec, open-jev repository: https://github.com/daseinlabs/open-jev