Skip to content
Stefan Manja
← Selected writing

Replacing gpt-4o-mini: one line of code sends 39 in 1,000 customers to the wrong team

I tested four replacements for a gpt-4o-mini support router on 9,758 Banking77 messages. Swapping the model ID took misroutes from 0% to 3.9%. The best replacement depends on how many mistakes you accept, and the token price on the vendor's website says almost nothing about your bill.

3.9%of customers sent to the wrong team after changing only the model ID.Banking77 test set, 9,758 messages - see methodology below

OpenAI switches off gpt-4o-mini on January 14, 2027. A lot of quiet production code runs on it: classifiers, extractors and routers built in 2024 that worked well enough and were never touched again.

The obvious migration is one line. Replace the model ID with the named successor, gpt-6-luna, and ship.

I ran that on a support-message router. Same prompt, same confidence threshold of 0.95, new model ID, reasoning off. Before the change, no message went to the wrong team without a human check. After it, 3.9% did. That is 39 customers in every 1,000: the person whose card was just stolen, waiting in the queue for address changes. No error, no alert. Each of those misroutes came back as valid JSON with a confident answer.

How did the old model manage zero? By almost never deciding alone. gpt-4o-mini was 0.95 sure about only 2 messages in 100, and it got those right; a person read the other 98. Luna is 0.95 sure about half of all messages and routes them on its own. That half includes the 39.

The threshold is the problem. A 0.95 from gpt-4o-mini and a 0.95 from Luna are different promises, and nothing in your code knows that.

Two numbers run a router

A customer message comes in. The model picks one of 50 team queues and says how sure it is. Above a threshold, the message is routed automatically. Below it, a person reads it.

  • Misroute rate: the share of all messages sent automatically to the wrong queue. This is the risk.
  • Automation rate: the share of all messages nobody has to read. This is the value.

Turn the threshold up and both drop. The whole game is: how much can you automate while misroutes stay under a limit you are willing to live with?

I tested four ways out of gpt-4o-mini on 9,758 Banking77 test messages:

  • Luna (gpt-6-luna), OpenAI’s named successor, run twice: with gpt-4o-mini’s prompt unchanged, and with a prompt I rewrote for Luna in three rounds on the tuning set (sharper borders between look-alike queues, stricter rules for its top confidence scores);
  • Claude Haiku 5.5, the obvious rival;
  • Jev, TypeSafe’s decision model, which returns probabilities instead of text;
  • OpenAI’s Decisions API, the same Luna behind a decision-model interface.

Every model got its own threshold, fitted on a separate tuning set of 3,075 labelled messages. The 9,758 test messages stayed untouched until the original rules were written down and frozen in git.

From 2% to 72%

gpt-4o-mini jumps from 2% to 72%

Look at the old model first. It is worse than most teams think.

gpt-4o-mini speaks in steps of 0.05, and it is confident about almost everything. On the tuning set it said 0.90 for 76% of the answers it routed. 470 of those 1,994 answers were wrong. Only 50 answers got 0.95.

So its threshold has two useful settings:

  • 0.95: 2% of messages automated. Safe and useless.
  • 0.90: 72% automated, and 15% of all messages misrouted. One in five of the messages it routes on its own goes to the wrong team.

Nothing in between. If your gpt-4o-mini classifier’s threshold is 0.9, go and count what it lets through.

The error budget

The winner depends on how many mistakes you accept

A 2% misroute limit means 20 customers in 1,000 sent to the wrong desk. Where to draw that line is a business choice. A fraud queue might tolerate 1%. A queue where a wrong route costs a 30-second handover might tolerate 10%.

So I ran the comparison at five limits. Each model gets its own threshold per limit. The table shows automation; higher is better.

Share automated at a misroute limit of1%2%5%10%15%
gpt-4o-mini (today)2.1%2.1%2.1%2.1%72.4%*
Luna, gpt-4o-mini’s prompt0.1%34.8%50.2%50.2%71.3%
Luna, rewritten prompt13.2%42.9%42.9%63.9%73.2%
Claude Haiku 5.520.0%34.8%46.9%63.0%63.0%
Decisions API (Luna)15.9%25.3%47.3%*62.7%*70.4%
Jev0%0%53.6%66.2%74.9%*

* Within the limit on the test set, but too close to call. Bold: the most automation among models that stay clearly within the limit.

The migration is free capacity. Between a 2% and a 10% limit, every LLM replacement automates 25-64% of messages. gpt-4o-mini automates 2%. On a router handling 10,000 messages a day, that is up to 6,000 more messages a day that nobody has to read, within the same misroute limit.

AUTOMATION · 2% MISROUTE LIMIT Two horizontal bars titled AUTOMATION · 2% MISROUTE LIMIT: 2.05% gpt-4o-mini; 42.89% LUNA · REWRITTEN PROMPT. AUTOMATION · 2% MISROUTE LIMIT gpt-4o-mini 2.05% LUNA · REWRITTEN PROMPT 42.89%
At the 2% misroute limit, gpt-4o-mini automates 2.05% of messages and Luna with the rewritten prompt automates 42.89%. Each configuration has its own threshold fitted on the tuning set.

There is no best model. Haiku leads at 1%. Luna with the rewritten prompt leads at 2%. Jev leads at 5% and 10%. Any leaderboard that names one winner for this job answers a question nobody asked.

At 15%, the race is over. If your business already lives with gpt-4o-mini at 0.90, a replacement buys you little beyond staying online.

So the order of decisions is fixed. First the misroute limit, agreed with whoever owns the queue. Then a threshold per model, on your own data. Only then the model.

Beyond token prices

The token price is not your bill

TypeSafe sells Jev as “193.6x Faster, 444.6x Cheaper” than LLMs, “based on workflows for System One tasks”, with an input price “238x lower” than Claude Fable 5.1. At $0.042 per million input tokens, it is cheap per token.

But a router does not pay per token. It pays per message, and every message carries the same baggage: the descriptions of all 50 queues, a few thousand tokens, sent again with every customer message.

Luna and Haiku can keep that baggage in a prompt cache and read it back at a tenth of the price. Jev and the Decisions API cannot. Think of a single ticket against a season pass: the single ticket is cheaper on the price board, and the season pass wins as soon as you travel every day.

ModelCost per 1,000 messages, busy router (cache warm)Quiet router (cache cold)
Luna, gpt-4o-mini’s prompt$0.039$0.277
Claude Haiku 5.5$0.059$0.452
Jev$0.146$0.146
gpt-4o-mini$0.218$0.410
Decisions API (Luna)$0.232$0.232

On a busy router, Jev costs 3.7 times as much as Luna. On a quiet one, about half. The crossover comes early: at about two messages an hour, cached Luna is already the cheaper one.

And here is what the price board hides. Jev wins on cost exactly where cost does not matter. At 50 messages a day, every option on this list costs under a dollar a month. At 10,000 a day, the cache is always warm: Luna costs about $12 a month, Jev $44. At that volume, the difference between automating 2% and 43% of messages is 4,000 messages a day that nobody has to read. That is the real bill, and no API price comes close.

Same model, two doors

The Decisions API is the cleanest experiment here: same Luna, different door.

I timed both doors from Belgrade, one request at a time, interleaved with every other model. Behind the Decisions door, Luna spent 0.08 seconds on OpenAI’s servers at the median. Behind the normal API, 0.96 seconds. Twelve times less server time, in line with OpenAI’s own “up to 10x”. End to end, an answer took 0.28 seconds instead of 1.26.

It also cost six times as much per message as cached Luna, and it automated less: 25% of messages at a 2% limit, against 35%. Its confidence is rounded to two decimals and piles up at the top, just like Jev’s.

So the Decisions API sells speed. For a ticket queue, where nobody notices a quarter of a second against a second and a quarter, that is money spent on the wrong thing. For live chat or voice, it could be the whole point.

Jev: right answers, blunt confidence

Jev is the most interesting result, because its answers are good. On tuning messages that belong to one of the 50 queues, its top pick was right 85.6% of the time, against 84.2% for gpt-4o-mini.

It is also fast. From Belgrade, Jev answered in 0.28 seconds at the median, with the tightest tail of anything I tested: 95% of answers within 0.35 seconds. The small LLMs took 1.0 to 1.3 seconds. That is four times faster, a real advantage for anything a customer waits on. It is not the “193.6x Faster” on TypeSafe’s homepage, whose own example puts an LLM at 8.6 seconds per task. Small models without reasoning answer a router in about one second.

Its confidence is blunt. Jev rounds its probabilities to two decimals, so answers pile up at exactly 1.00. On the test set, 43% of all messages landed at 1.00, and one in 19 of those went to the wrong queue. The new 1.14 preview rounds the same way.

Here is the twist: the LLMs give the same wrong answers. Of the 217 messages Jev misrouted at 1.00, Luna picked the same wrong queue for 216, Haiku for 214 and gpt-4o-mini for 212. They are the hard cases. On 423 test messages, every model I tested picked the same queue and the dataset’s answer key said otherwise.

The difference is what each model does next. Luna gives those messages a slightly lower score than its easy ones, so its threshold at 0.99 lets through about a fifth of them and still routes half of its right answers. Jev’s strictest threshold, 1.00, lets through two in five, and there is no stricter one. Under a 2% limit, Jev automates nothing at all.

Jev’s answers are fine. Its scale stops too early.

I asked TypeSafe whether the rounding is deliberate. Their team answered on Discord: if a threshold has to be set to the last 0.01, the approach needs to change. Their advice for tied answers is to work out what separates them, as you would explain it to a person, and ask Jev about that in another question.

My rescue was exactly that kind of question: a second Jev question, the probability that the message fits any of the 50 queues at all. It landed at 2.03% misroutes. Close, and a fail. A sharper second question might get under the line, but that is question design work, where Luna and Haiku needed only a threshold. The failed rescue is published next to everything else, because a method that only reports its wins is marketing.

That is the lesson I would carry to any classifier, LLM or not: a confidence score can be right on average and still useless for a threshold. The threshold sits at the top of the scale, where you stop asking a human. If 40% of answers share the top value, the threshold has one setting, and it is the wrong one.

How it was run

Results like these are only worth something if the rules could not bend to fit them.

  • The metrics, the threshold rule and the pass rules for each replacement were written in a specification before any test message was sent.
  • The rules were frozen with a git tag. Every test run records the tag it ran under, and the runner refuses to run the same model setup twice.
  • The decision records, which hold each verdict and the five-limit table, are generated from the raw recorded responses. CI regenerates all of them on every change and checks them byte for byte.
  • The 2% analysis and the Jev rescue were each written down as additions to the rules before their test numbers existed. The five-limit comparison was added after the first test results, before any number at the other limits was computed. The shared-mistakes comparison came after all results.

The whole study cost about $14.50 in API calls.

What I got wrong

The verdicts I wrote down in advance said little. All five came back “ship it”, because the automation rule could not fail: it let each replacement automate up to 3 points less than gpt-4o-mini, and gpt-4o-mini automated only 2%. I saw it after running gpt-4o-mini on the tuning set. Changing the rule then would have been moving the goalposts, so it stayed, and the real analysis went in as written additions.

My 100-message trial run before the study already had the evidence. gpt-4o-mini gave 74 of those messages a confidence of 0.90 and exactly one a 0.95. Five minutes with that count would have saved the rules I wrote in advance. It is now the first thing I would check in any classifier migration.

If you own a gpt-4o-mini classifier, the work is short:

  1. Agree on the misroute limit with the queue owner.
  2. Refit the threshold for every candidate on your own labelled messages. Never carry the old one over.
  3. Count how many answers share the top confidence score before you trust a threshold.
  4. Price the model per message at your real traffic, not per token.

Methodology note

  • Data: Banking77 (PolyAI), pinned commit; 50 intents as queues, the rest as “none of these”; 3,075 tuning (development) and 9,758 test messages. Clean, single-turn English; real support traffic is messier. Misroutes count against Banking77’s labels; on 4.3% of test messages all six configurations agree with each other and not with the label, and every model is scored against the same labels.
  • Prompt: each of the 50 queues has a one-line description and one example message. The example was drawn by a fixed hash rule from five Banking77 messages per queue and never edited, so a few are atypical: the example for transfer_fee_charged never mentions a transfer. Every model got the same examples, and the rewritten Luna prompt kept them unchanged. A later check on the tuning set replaced the six least typical: automation at the 2% limit changed by about half a point for gpt-4o-mini and one point for Luna.
  • Models: gpt-4o-mini-2024-07-18, gpt-6-luna (Responses API without reasoning, and Decisions API), claude-haiku-5-5 (no thinking), jev-1.13.0 (TypeSafe’s stable release; 1.14 was in preview). Test runs on October 22, 2026.
  • Rates are shares of all test messages. * marks a one-sided 95% Wilson upper bound at or above the limit. The 2% analysis was declared before any replacement ran; the Jev rescue and the five-limit table after the first test results.
  • Cost: mean token usage per message at list prices on October 22, 2026. Warm cache prices the shared prompt as a cache read, cold as uncached input. Traffic figures assume random arrivals and one cache per prompt.
  • Speed: a separate study from Belgrade over home Wi-Fi, 200 rounds with all six configurations interleaved, one request at a time, on October 22, 2026; server time from OpenAI’s openai-processing-ms header. Latency was reported, never gated: a ticket queue does not need sub-second answers.
  • Vendor claims as read on typesafe.ai and OpenAI’s Decisions API guide on October 22, 2026.
  • Code, specification, run records and decision records: model-swap-check on GitHub.

Workflow review

Discuss your workflow

If you have a similar internal AI workflow to build or harden, I can review the workflow shape. A short note on the workflow, users, current stage, and constraints is usually enough to tell whether build or advisory work makes sense.