AI Economics 2: Routing, Build vs Buy, and Lock-in

Three sourcing decisions that set your AI margin for years: which model handles which task, whether to build, buy or partner, and how much freedom to switch you keep.

Page 1 worked out the copilot's cost per ticket and the levers that cut it. This page takes the decisions above a single prompt: which models, which vendors, and what you own. It goes deeper than the gateway and routing basics in the production platform chapter.

Model routing and cascades

The builder track showed the basic idea: try a cheap model first and escalate hard requests (Production AI Platform: Model routing: small model first). This section asks the money question that comes before you build it: does routing actually make you money on your traffic, and how would you know if it stopped? The short answer surprises most teams. The token savings are usually small, and the quality risk is usually larger than it looks.

The main tool is the cost/quality frontier — the set of best possible trade-offs between what you spend and how good the answers are. A good router moves you along it. A bad router puts you below it: you pay less and get worse answers, and nothing on the dashboard shows the second part.

Three patterns that get called "routing"

People use "routing" for three different designs. They have different costs, different failure modes, and they need different evals. Name them precisely.

  • Router — a component that decides before any model runs which model should handle a request. It can be rules ("refund tickets go to the strong model") or a trained classifier. Each request is answered once.
  • Cascade — every request goes to the cheap model first. A check reads the draft. If the check fails, the request is sent to the stronger model. Escalated requests pay for both models and both latencies.
  • Fallback — a backup model used only when the primary returns an error, a rate limit (429), or times out. It is about availability. It saves no money, and it can silently change behavior because the backup is a different model.
Three rows. Row 1, router: a ticket goes to a router that decides before any model runs; it sends easy tickets to Haiku 5.5 and hard tickets to Sonnet 5.5; each ticket is answered once. Row 2, cascade: every ticket goes to Haiku 5.5 first; a check reads the draft; if the check passes the draft is used, if it fails the ticket is sent to Sonnet 5.5, so escalated tickets pay for two models and two latencies. Row 3, fallback: the ticket goes to the primary model; only if the provider returns an error or times out does the gateway send it to a backup model. Fallback is about availability, not quality or cost.
Three ways to use more than one model. Read it as: a router guesses difficulty before any model runs. A cascade looks at a real draft and pays twice when it escalates. A fallback only reacts to errors, so it saves nothing and can quietly change behavior.
PatternDecides usingMain costMain risk
RouterThe input only (ticket text, intent, metadata)Router call (often near zero)Hard case judged "easy" goes to the small model; no second look
CascadeA real draft plus a checkEscalations pay twice; added latencyThe check passes a bad draft
FallbackAn error from the providerNone until it firesUntested model answers real users during an outage

The economics: savings are small, misroutes are not

Start from the cost model in Economics 1: Worked example: cost per resolved ticket. Prompt caching is already on (it is lever 1 in Economics 1: The ranking), so routing is a lever stacked on top of it, not a replacement for it. On Sonnet 5.5 with caching, one agent call costs about $0.0079. The same call on Haiku 5.5 ($0.10 / $0.50 per million, cache read $0.01) costs about $0.0004: twenty times less. The agent loop, by ticket class:

Class (per day)CallsLoop on Sonnet 5.5Loop on Haiku 5.5
Easy: order status, shipping (200)3$0.024$0.0012
Normal: billing, refunds ≤ $50, account (162)5$0.041$0.002
Hard: refunds over $50, other (38)12$0.141not routed

(Haiku 5.5's price rises five times for any request whose prompt is over 100,000 tokens, cache reads included. Hard tickets with long threads can cross that line; one more reason they stay on Sonnet.) The obvious first route: send the 200 easy tickets to Haiku.

saving = 200 × ($0.024 − $0.0012) = $4.60 a day, about $140 a monthOn a copilot whose whole AI line is $0.10 per ticket and whose human line is $6.11 (Economics 1: Worked example: cost per resolved ticket).

That is real but tiny. Now price the other side. A misroute here means a ticket the cheap model handles worse than the strong one would have. Suppose Haiku's drafts on easy tickets are discarded 3 percentage points more often than Sonnet's. A discarded draft costs the agent 13 minutes instead of 8.5 (Economics 1: Cost per successful task): 4.5 minutes × $0.667 = $3.00.

extra failures = 200 × 0.03 = 6 a day → 6 × $3.00 = $18 a dayThe route saves $4.60 and costs $18. It loses about $13 a day while the token dashboard shows the easy-ticket loop 95% cheaper.

Turn it around and you get the one formula that decides whether routing pays. Routing a ticket saves the price gap. It costs the extra failure rate times the cost of one failure. So:

break-even quality gap = (cbig − csmall) / cost of one failure = ($0.024 − $0.0012) / $3.00 ≈ 0.8 pointsRouting easy tickets only pays if Haiku is within about 0.8 percentage points of Sonnet on the tickets it actually receives.

A bar chart, to scale, in dollars per day for routing the copilot's 200 easy tickets a day from Sonnet 5.5 to Haiku 5.5. Bar 1: token savings, 4 dollars 60. Bar 2: cost of misroutes if Haiku's drafts are discarded 3 percentage points more often and each extra discard costs 3 dollars of agent time, 18 dollars. Bar 3: the same misroute cost if the gap is only 0.5 points, 3 dollars. A note gives the break-even gap: 0.024 minus 0.0012 dollars, divided by 3 dollars, about 0.8 points.
Per day, 200 easy tickets: what routing saves vs what misroutes cost. Read it as: the token saving is small because both models are cheap next to a person's time. A 3-point quality gap on routed tickets costs four times what the route saves. Routing pays only when the small model is within about 0.8 points of the big one on the traffic it receives.

Three things follow from this formula.

  • Volume does not change the break-even. Savings and failure costs both grow with traffic. Volume only decides whether the engineering effort is worth it at all.
  • The price gap matters a lot. If the strong model were claude-fable-5-1 ($10 / $50, cache read $0.25, cache write $12.50), an easy ticket's loop would cost about $0.118 and the break-even gap grows to about 3.9 points. Routing is far more attractive when the expensive model is very expensive.
  • The failure cost matters most. If a failure is a wrong refund promise rather than a discarded draft, its cost is the refund itself plus the clean-up, far above $3, and the break-even gap shrinks toward zero. That is why refund tickets are not routed down at all.

Economics 1: Cost per successful task made the same point for the extreme case, running the whole copilot on Haiku: it saves $0.04 a ticket and a 5-point shift to discarded drafts costs $0.15. Routing is the careful version of that bet, one ticket class at a time.

Classifier routers: what the research actually shows

A learned router is a small model trained to predict, from the prompt alone, whether the cheap model's answer will be good enough. The best-known open work is RouteLLM (Ong et al., LMSYS and Anyscale, 2024; revised February 2025). It trains routers on preference data — records of which of two models' answers people preferred — mostly from Chatbot Arena. It compares four router types: similarity-weighted ranking, matrix factorization, a BERT classifier, and a small LLM used as a classifier. The strong model was GPT-4 and the weak model was Mixtral 8x7B.

It measures results as performance gap recovered: if the weak model scores 0 and the strong one scores 1, what fraction of that gap does the routed system get back, and at what share of strong-model calls?

A chart. The x axis is the share of queries sent to the strong model, from 0 to 100 percent. The y axis is the share of the quality gap between the weak and strong model that is recovered, from 0 to 1. A dashed diagonal shows random routing: sending x percent of traffic at random recovers about x percent of the gap. A solid curve shows the RouteLLM matrix-factorization router on MT Bench with GPT-4 as the strong model and Mixtral 8x7B as the weak one: it recovers half the gap with 13.4 percent of calls to GPT-4 and 80 percent of the gap with 31.3 percent. Two markers show these points. A note says that on MMLU and GSM8K the best routers needed 35 and 34 percent strong calls for half the gap, much closer to random.
The cost/quality frontier, using real router results. Read it as: the area between the curve and the diagonal is what a router buys. On chat-style MT Bench it is large. On the paper's knowledge and maths benchmarks the curve sits much closer to the diagonal. Your own traffic decides which picture you get.
BenchmarkBest router: strong calls for half the gapRandom routingCost saving
MT Bench (chat)13.4% (matrix factorization)49.0%3.66× at 95% of GPT-4 quality
MMLU (knowledge)35.4%, only after adding ~1,500 in-domain labels50.1%1.41×
GSM8K (maths)33.6% (LLM classifier)50.0%1.49×

Read the rows, not just the headline. The often-quoted "more than 2× cheaper" holds on chat-style traffic. On knowledge and maths it is closer to 1.4–1.5×. And the paper reports that, trained on Arena data alone, some routers did worse than random on MMLU and GSM8K. What fixed it was a small amount of labeled data from the target domain: about 1,500 MMLU examples, under 2% of the training data. The lesson for you: a router trained on someone else's traffic is a guess about yours. The RouteLLM code says the same thing in its own setup steps: calibrate the threshold on a sample of your own queries, because the real share of strong-model calls depends on your traffic.

Newer, larger evaluations are less optimistic. RouterEval (EMNLP 2025 Findings) found that most existing routers often did worse than simply using the best single model in their pool. LLMRouterBench (January 2026; 400K+ instances, 21 datasets, 33 models) found that many recent routers, including commercial ones, do not reliably beat a simple baseline, while a large gap to a perfect "oracle" router remains. Routing has real headroom, but off-the-shelf routers mostly do not capture it.

For the copilot, that points to a plain first design: rules on signals you already have. The ticket intent classifier you already run, the customer's plan tier, whether an order is involved, thread length. These are cheap, explainable, and easy to evaluate per route. Train a learned router only when error analysis shows the rules leave money on the table.

STRONG = "claude-sonnet-5-5"
CHEAP = "claude-haiku-5-5"

def route(ticket) -> str:
    # money or policy at stake: never route down
    if ticket.intent in {"refund", "billing_dispute", "legal"}:
        return STRONG
    # long threads: more context, more ways to go wrong
    if ticket.message_count > 6 or ticket.tokens > 60_000:
        return STRONG
    # narrow, well-evaluated intents only
    if ticket.intent in {"order_status", "password_reset", "how_to"}:
        return CHEAP
    return STRONG  # unknown intent: default to quality

The default is the strong model. A new, unknown kind of ticket should never land on the cheap model just because nobody wrote a rule for it.

Cascades: the check is the whole design

A cascade is safer than a router because it looks at an actual draft. FrugalGPT (Chen, Zaharia and Zou, 2023) made the case: a cascade with a learned scorer matched GPT-4 with up to 98% cost reduction on their benchmarks. The catch is the scorer. The cascade is only as good as the check that decides "good enough".

The cost formula for a cascade:

ccascade = csmall + ccheck + e × cbige = escalation rate. For an easy ticket with a code check (cost ≈ 0) and e = 30%: $0.0012 + 0.3 × $0.024 ≈ $0.0084, against $0.024 on Sonnet alone.

With a 20× price gap, a cascade still saves tokens even if it escalates 90% of tickets. So cost is not what limits it. Two other things are. Latency: an escalated ticket waits for two models. Check quality: a check that passes bad drafts is a router with extra steps.

Good checks for the copilot, best first:

  1. Hard facts from tools. The draft mentions a refund and get_order shows an amount over $50 or delivery more than 30 days ago: escalate. This is code and costs nothing.
  2. Structure. Draft failed the output schema, cited no KB article, or called no tool before stating an order fact: escalate.
  3. Retrieval signal. The top KB match has low similarity: the cheap model is guessing. Escalate.
  4. A validated judge. A small judge call with a binary rubric. Only after you have measured its agreement with your expert (Evals 2: Trusting your judge: validating LLM-as-judge).

Avoid asking the small model how confident it is. A model's self-reported confidence is a weak signal of whether its draft is correct, and it is weakest on exactly the hard cases you need to catch.

Per-route evals: how you see a silent quality drop

The overall pass rate is the wrong number to watch. If half the tickets go to Haiku and Haiku's quality drops on one intent, the average barely moves. You need the pass rate per route and per intent, and you need to know what the big model would have done on the same tickets.

Regret sampling — for a small random share (say 2%) of tickets routed to the cheap model, also run the strong model in shadow and grade both. The share where the strong model passed and the cheap one failed is the router's regret: the quality you gave up to save money. It is a paired comparison on the same ticket, so it needs far fewer samples than comparing two separate groups (Evals 2: Paired comparisons: same questions, both versions).

from collections import defaultdict
from math import sqrt

def regret_report(rows, max_gap=0.008):
    """rows: shadow-sampled tickets routed to the cheap model.
    Each row: intent, small_ok (bool), big_ok (bool)."""
    by = defaultdict(lambda: [0, 0, 0])  # n, big-only wins, small-only wins
    for r in rows:
        b = by[r["intent"]]
        b[0] += 1
        b[1] += r["big_ok"] and not r["small_ok"]
        b[2] += r["small_ok"] and not r["big_ok"]
    for intent, (n, lose, win) in sorted(by.items()):
        gap = (lose - win) / n
        se = sqrt(max((lose + win) / n - gap**2, 0) / n)
        alert = gap - 2 * se > max_gap   # gap clearly above break-even
        print(f"{intent:15} n={n:4} gap={gap:+.3f} ±{2*se:.3f}"
              + ("  ALERT: route up" if alert else ""))

The max_gap is the break-even gap from 4.2 (0.8 points, written as 0.008), not a number someone liked. When an intent alerts, route it up first and investigate after. Now check what the sample can see. At 200 easy tickets a day, 2% shadow sampling gives about 120 graded pairs a month. That catches a gap of several points, not 0.8. Sampling 10% (about 600 pairs a month; the shadow Sonnet runs cost about $15) narrows the interval to roughly ±2 points (wider if the two models often disagree). Seeing a 0.8-point gap takes several months of pooled samples. This is why the rules in 4.3 keep money-at-stake intents off the cheap route entirely, rather than relying on detection.

Traps

Build, buy, or partner

Every AI feature starts with a sourcing decision, often made without anyone noticing it was a decision. Someone wires up an API call, and a year later the company has a team maintaining prompts, evals and model migrations. This section makes the choice explicit and puts year-one numbers on it.

Three options, defined by which layers you own

  • Build — you own the model layer: you train, fine-tune, or self-host a model (often open weights) and run the serving infrastructure, plus everything above it.
  • Partner — you rent the model through a vendor API (Claude, OpenAI, Gemini) and own everything above it: prompts, orchestration, evals, tool integrations, data, and the user-facing workflow. The support copilot is this.
  • Buy — you buy a finished AI product or feature from a vendor: a helpdesk vendor's AI agent, an AI copilot seat, a coding assistant. You own configuration and the contract.
Three columns, build, partner and buy, each a stack of four layers from bottom to top: model weights and serving, prompts and orchestration and evals, tools and data integration, and the user-facing workflow. In build, your company owns all four layers. In partner, the vendor owns the model layer and your company owns the other three. In buy, the vendor owns all four layers and your company owns only configuration and the contract. A note says most SaaS teams who say they built AI actually partnered.
Build, buy, partner: who owns each layer. Read it as: the question is not "AI or no AI" but how many layers you own. Each layer you own is something you can tune and something you must staff. Partner owns the three layers where your product differs and rents the one that changes fastest.

Most SaaS teams who say "we built our own AI" actually partnered. The difference matters for planning. Partnering means you do not carry model training risk, but you do carry the full cost of the three upper layers, and you depend on the vendor's model roadmap (Lock-in and portability: what an abstraction layer really buys).

The decision matrix

Score each option against six questions. The first two decide most cases.

QuestionPoints to buildPoints to partnerPoints to buy
Differentiation: do customers choose you because of this?Yes, and the model itself is the differenceYes, and the difference is your workflow or dataNo; it is a cost center or internal tool
Data advantage: do you hold data others cannot get?Large, labeled, and a frontier model cannot use it from a promptYes, usable through retrieval and toolsNo, or the vendor already has it
Speed: how soon must it ship?Quarters to yearsWeeks to monthsDays to weeks
Cost at scale: does unit cost dominate?Very high, steady volume on a narrow taskMedium to high volumeLow to medium volume
Talent: who will own it in two years?An ML team with serving and training experienceAn AI product team with eval disciplineA vendor manager and an admin
Risk and control: what if the vendor changes terms?Regulation or contract forbids sending data outAcceptable with a gateway and evalsAcceptable; switching is a procurement task

The matrix is not a vote. One hard "no" can decide it. If data cannot leave your network under contract, buy and partner may both be off the table regardless of cost.

Total cost of ownership, worked for the copilot

Total cost of ownership (TCO) — every cost of an option over a period, not only the invoice: build time, the people who keep it running, tokens, infrastructure, and the cost of switching later. For AI features the line most often left out is the eval and operations team: someone owns the gold set, reads traces, re-tunes prompts, handles model migrations (about one per model per year, Deprecation: the migration you cannot skip), and answers when quality drops.

Assumptions for the copilot (state yours as plainly): 400 tickets a day (about 12,000 a month), 25 support agents, $200K loaded cost per engineer-year (about $16.7K a month; Economics 1: Worked example: margin per ticket uses the same figure for its half engineer), list prices as of October 2026.

OptionWhat you payYear one
Buy A: helpdesk copilot seats (drafts for agents)25 seats × $29/month (Intercom Copilot, billed annually)about $9K
Buy B: helpdesk AI agent (resolves on its own)$0.99 per outcome (Intercom Fin) × 35% of 12,000 tickets a monthabout $50K
Partner: the copilot on the Claude APIBuild: 2 engineers × 3 months = $100K. Run: half an engineer × 9 months = $75K. Full AI cost $0.10 × 12,000 = $1,200/month × 9 months = ~$11Kabout $186K
A bar chart, to scale, of year-one cost for the support copilot. Buy A, vendor copilot seats for 25 agents at 29 dollars a month: about 9 thousand dollars. Buy B, a vendor AI agent at 99 cents per outcome, resolving 35 percent of 12,000 tickets a month: about 50 thousand dollars. Partner, building on the Claude API: about 186 thousand dollars, of which 175 thousand is engineering time (100 thousand to build, 75 thousand for half an engineer running it for nine months) and only about 11 thousand is the full AI cost, drawn as a thin slice.
Year-one cost at 400 tickets/day (to scale). Read it as: at this volume, the token bill is a sliver; engineers are the cost. Partner has to earn its almost 4x year-one premium over Buy B with value a vendor cannot give you, or with volume (steady-state crossover near 1,000 tickets a day).

Two things stand out. First, the whole AI line is about 6% of partner TCO. Arguments about which model is $0.50 cheaper per million tokens are arguments about the smallest line. Second, the buy options are not the same product. Buy A drafts for agents, as our copilot does. Buy B resolves tickets with no agent, and is charged only when it succeeds. A vendor charging per outcome absorbs the cost of its failed attempts; when you partner, you pay tokens on every ticket, solved or not.

Where is the crossover? Compare like with like: an AI agent of your own that resolves tickets, against Buy B. In steady state (year two onward), partner costs about $107K a year in fixed cost (half an engineer plus $600 a month of infra) plus the variable AI cost of $0.048 per ticket (Economics 1: Worked example: cost per resolved ticket). Buy B costs 0.35 × $0.99 ≈ $0.35 per ticket averaged over all tickets. The two meet at $107K / ($0.35 − $0.048) ≈ 360,000 tickets a year, about 1,000 tickets a day. Below that, buying is cheaper on cost alone. Above it, partnering is cheaper, if your agent resolves as well as the vendor's and half an engineer really is enough. (Resolutions are worth far more than drafts: Economics 1: Deflection value values a true resolution at the full $8.00 human cost of a ticket.)

So for this company, at 400 tickets a day, the honest answer is: the copilot is an internal tool, and buying is probably right unless partnering gives value a vendor cannot. Things that would justify partnering here: refund logic tied to your own billing system that a vendor's configured actions cannot express safely; a plan to sell the same AI to your own customers (then it is product, not internal tooling); or volume heading past the crossover. Measure those as value per ticket (Economics 1: Value per task: measuring what the feature is worth), not as a feeling.

What real companies learned

CaseChoiceWhat happenedLesson
BloombergGPT (2023)Build: a 50B-parameter model trained on 363B tokens of Bloomberg's financial data plus 345B general tokensMonths later, Li et al. (EMNLP 2023 Industry) found general models such as GPT-4 beat domain-trained models, BloombergGPT included, on many financial tasks, while still trailing on some (financial entity recognition, sentiment)A model-layer advantage can disappear with the next general model release. Proprietary data was the moat, not the weights trained on it
Klarna assistant (Feb 2024)Partner: built on OpenAIKlarna reported 2.3M conversations in month one, two-thirds of its service chats, "equivalent work of 700 full-time agents", and an estimated $40M profit improvement in 2024. In 2025 its CEO said the push had gone too far, cost had weighed too heavily, and quality suffered; Klarna began hiring human agents againPartnering was fast. The mistake was the value metric (cost per chat) not the sourcing choice. Pair any cost metric with a quality metric
Klarna and Salesforce (2024–25)Reported as "replaced SaaS with AI"In 2024 Klarna said it had shut down Salesforce. In March 2025 the CEO clarified: "no, we did not replace SaaS with an LLM"; Klarna consolidated data on an internal stack built on Neo4j"Build instead of buy" headlines often describe data consolidation, not an LLM replacing a product. Ask what was actually built

Survey data points the same way, with caveats. MIT NANDA's "The GenAI Divide" (2025) reported that tools bought from specialized vendors, and partnerships, succeeded about 67% of the time, while internal builds succeeded about one-third as often. The published version is labeled preliminary, the definition of "success" is broad, and vendors quote it freely. Treat it as a direction, not a measurement.

When buying is right, and the clauses that keep it right

Default to buy for internal tools where the workflow is the vendor's product: helpdesk AI, meeting notes, coding assistants, sales-email drafting. Your support workflow is probably not what makes customers pick you. Default to partner when the workflow is yours and customers pay for it. Reserve build for a model-level advantage you can defend and staff.

When you buy, the contract is your portability layer. Check, before signing:

  • Outcome definition. For per-resolution pricing, the vendor defines what counts as a resolution. Read the definition and sample billed outcomes against your own judgement every month.
  • Data export. Can you export conversations, labels, and the knowledge base in a usable format? That data is your future eval set if you ever switch to partner.
  • Training and retention terms. Whether your data trains the vendor's models, and how long they keep it (Production AI Platform: Data privacy and compliance).
  • Price change notice and minimums. Usage pricing in this market changes often (Economics 3: Pricing AI features: seats, usage, credits, outcomes). Fin, for example, has a monthly outcome minimum when used with another helpdesk.

The decision expires: when to re-run it

A build/buy/partner decision is made on a snapshot of prices, volume and model quality, and all three move every few months. Write the triggers into the decision record, so the next review happens because a number moved, not because someone got curious.

TriggerWhy it can flip the answerCopilot threshold
Volume crosses the crossoverFixed people cost spreads thinner; per-outcome fees do notSustained 1,000+ tickets a day
Vendor price or pricing-model changePer-outcome and per-seat prices in this market change often (Economics 3: Pricing AI features: seats, usage, credits, outcomes)Any change at contract renewal
A new model generationA cheaper or better model changes partner's unit cost and quality; it may also close a gap that justified buildingEach Haiku or Sonnet release; run the gold set within a month
The AI becomes part of what you sellAn internal tool becomes product; control and differentiation start to matterA roadmap item that exposes the copilot to customers
Team changePartner assumes an owner for evals and migrationsThe owner leaves and is not replaced within a quarter

Note the asymmetry. Moving from buy to partner later is slow if you did not keep your data: you start without traces, labels or a gold set. Moving from partner to buy is fast but throws away the eval work. If you buy now and might partner later, the cheapest insurance is the export clause in 5.5 plus a monthly sample of graded conversations, so a future team starts with an eval set instead of an empty folder.

Lock-in and portability: what an abstraction layer really buys

Lock-in — the cost of switching away from a vendor, measured in money, time and risk. You never remove it. You choose where to keep it small. The common belief is "we use a gateway, so we're portable". This section shows why that covers only the easiest layer, and why the bigger forcing function is not switching vendors at all: it is your own vendor retiring the model you depend on.

Where lock-in actually comes from

SourceWhy switching hurtsCopilot exampleKeep it small by
Prompts tuned to one modelWording that works for one model can make another worse. Anthropic's own compatibility docs warn that prompts tuned for OpenAI should be reworked for ClaudeThe refund rules prompt was tuned over 14 versions against SonnetPrompts versioned with the model they were tuned for; eval set re-runnable on any model
Tool-calling and format quirksSchemas, forced tool choice, structured output and thinking settings differ by vendor and even by modelSonnet 5.5 and Opus 5.5 reject forced tool_choice with a 400; older code relied on itThin adapter per provider; contract tests on tool calls
Provider-only featuresCaching, batch, computer use, effort controls work differently or not at all elsewhereExplicit cache_control breakpoints; Batch API for nightly evalsUse them (they save real money, Economics 1: Cost levers, in order of payoff), but behind your own interface
Fine-tunesA fine-tune is tied to its base model and dies with itNone, and that is a choicePrefer prompts + retrieval; keep training data to re-tune elsewhere
EmbeddingsVectors from different models cannot be compared; switching means re-embedding everythingKB and past-ticket indexStore source text with chunk ids; scripted re-index (6.5)
Data and contractsCommitted-spend deals, data held by a vendor, no exportTicket labels in a vendor's toolOwn your traces and labels; export clauses

What a gateway buys, and what it does not

The AI gateway (Production AI Platform: The LLM/AI gateway) gives you one API in front of many providers. That is real value: one place for keys, retries, fallbacks, rate limits and cost logs. Changing the model string is a config change. But portability has three layers, and a gateway covers only the bottom one fully.

Three stacked bands. Bottom band, wire format: request and response shape, keys, retries, fallbacks; a gateway covers this fully. Middle band, features: prompt caching, batch, structured outputs, thinking and effort controls, computer use; a gateway covers this only partly, and lowest-common-denominator layers silently drop features. Top band, behavior: how the model follows your prompt, calls your tools, refuses, and how long it answers; no gateway covers this, only per-model evals do. A bracket on the right shows what LiteLLM or a similar gateway covers: the bottom band and part of the middle band.
Three layers of portability, and which ones a gateway covers. Read it as: a gateway makes the call portable. It does not make the answer portable. Only an eval suite you can re-run on any model does that.

The middle layer is where translation layers quietly lose things. Anthropic's own OpenAI-SDK compatibility layer is a good example, because it is honest about it. Its docs say it is "primarily intended to test and compare model capabilities" and not "a long-term or production-ready solution for most use cases". Through it, the strict flag on function calling is ignored (tool JSON is not guaranteed to match the schema), response_format is ignored, prompt caching is not supported, and "most unsupported fields are silently ignored rather than producing errors". The same is true, to different degrees, of any lowest-common-denominator layer: the request succeeds and something you relied on is gone.

The top layer, behavior, no gateway can cover. Two models given the same prompt and tools will choose tools differently, refuse differently, and write different lengths. The only thing that makes behavior portable is an eval suite you can run against any model (the evals guide's migration playbook, Evals 5: The model-migration playbook). The gateway lets you call another model in minutes. The eval suite tells you whether you can use it.

routes:
  support-copilot.draft:
    model: claude-sonnet-5-5         # retires not sooner than 2027-09-28
    prompt: draft_reply@v14          # prompt is versioned WITH its model
    eval_baseline: gold-v9@sonnet-5-5
    standby:
      model: gpt-5.6-terra           # same price tier: $2 / $12 per M
      prompt: draft_reply_oai@v3     # its own prompt, not a copy
      last_eval: 2026-10-01          # older than 60 days = not a standby

The config says what portability really is: a pair of model and prompt that has passed your evals recently. A standby model with a copied prompt and no recent eval run is not a standby. It is a hope.

Deprecation: the migration you cannot skip

Teams plan for lock-in as if switching were optional. It is not. Vendors retire models on a schedule, and when a model retires, requests to it fail.

  • Anthropic — lifecycle states are Active, Legacy (no more updates), Deprecated (still works, retirement date set), and Retired (requests fail). Anthropic gives at least 60 days' notice before retiring a publicly released model, by email and on its deprecations page. Example: Claude Sonnet 4.5 was deprecated on September 30, 2026 and retires on November 30, 2026, with claude-sonnet-5-5 as the replacement. Active models list a "not sooner than" retirement date, about a year after release (Sonnet 5.5: not sooner than September 28, 2027). Since November 2025 Anthropic has committed to preserving the weights of publicly released models, but preserved weights do not mean continued API access. Amazon Bedrock and Google-managed Vertex set their own retirement dates.
  • OpenAI — at least 6 months' notice for generally available models, at least 3 months for specialized variants, and as little as 2 weeks for preview models. The shutdown_date field on the Models API tells you programmatically. Example: GPT-4o and GPT-4.1 snapshots, announced October 14, 2026, shut down January 14, 2027. Fine-tuned models follow their base model's shutdown, and OpenAI is winding down self-serve fine-tuning (no new jobs for existing customers from January 6, 2027).
A timeline from June 2024 to January 2027. Each bar runs from the date in a model's ID to its retirement on the Claude API. Claude Sonnet 3.5 (June 2024) retired October 28, 2025: 16 months. Claude Haiku 3.5 (October 2024) retired February 19, 2026: 16 months. Claude Sonnet 3.7 (February 2025) retired February 19, 2026: 12 months. Claude Sonnet 4 and Opus 4 (May 2025) retired June 15, 2026: 13 months. Claude Opus 4.1 (August 2025) retired August 5, 2026: 12 months. Claude Sonnet 4.5 (September 2025) retires November 30, 2026: 14 months. A vertical line marks today, October 25, 2026.
Claude API model lifetimes: snapshot date to retirement (to scale). Read it as: every Claude model with a snapshot date from mid-2024 on that has a retirement date got one 12 to 16 months after that snapshot (the older Claude 3 models lasted 22 to 25 months). Plan one forced migration per model per year, whether or not you ever change vendor.

The pattern in that chart is the planning fact: on the Claude API, every model with a snapshot date from mid-2024 on that has received a retirement date got one 12 to 16 months after the date in its ID. (The Claude 3 models from early 2024 lasted longer: Opus 3 about 22 months, Haiku 3 about 25.) If you shipped on any of the recent ones, you migrated within about a year, whether or not you ever thought about switching vendors. OpenAI's snapshots have lasted longer (the May 2024 GPT-4o snapshot shut down in October 2026, after 29 months), which is worth knowing but does not change the plan: the migration still comes. So "portability work" is not insurance against an unlikely event. It is the cost of the migration you will do every year anyway. Make that migration cheap, and switching vendors becomes cheap as a side effect.

A migration within one vendor is not a string swap either. Anthropic's Claude Haiku 4.5 → 5.5 migration guide lists 10 items for the simplest starting point, including: remove temperature/top_p/top_k, replace assistant prefill, switch to adaptive thinking, handle safety refusals, and keep conversations append-only. It also warns that the same text produces about 30% more tokens on the newer tokenizer. Budgets, max_tokens limits and cost estimates all need recomputing. (The price fell from $1 / $5 to $0.10 / $0.50 per million, so cost still drops a lot; but your old token counts are wrong.)

Cost of switching, worked

Suppose a competitor model would make the copilot's agent loop 30% cheaper. (A hypothetical: at the frontier, list prices have converged, Economics 1: The same ticket on another vendor.) Should you switch? Price the switch in engineer-days at about $900 a day ($200K over ~220 working days).

Work itemEngineer-daysWhy
Error analysis + prompt re-tune on the new model5The old prompt was tuned to the old model
Tool-calling, structured output, thinking/effort adapter changes3Feature layer differs (6.2)
Caching and batch rework2Different caching model, different batch API
Paired eval runs, slices, judge re-check5If the judge is the old vendor's model, keep it fixed during the comparison
Shadow + canary, watching per-route metrics3Gold sets miss live inputs
Total18 (≈ $16K)Plus a small token bill for eval runs

payback = switching cost / monthly saving = $16K / (0.30 × $504) ≈ 106 monthsThe agent loop costs $0.042 × 12,000 = $504 a month, so 30% is $151. Payback takes about 9 years. The model will be retired long before the switch pays for itself.

At this volume, switching for token price never pays. It pays for quality (a measurable gain in resolution rate), for a capability you need, for risk (a vendor outage history or terms you cannot accept), or at a much larger token bill. At 40,000 tickets a day the same 30% is about $15K a month, and payback is about one month. The work is the same size at any volume; the savings are not.

Notice what drove the 18 days: prompts and evals, not plumbing. The investment that makes both forced migrations and voluntary switches cheap is the same one: a re-runnable eval suite, prompts versioned with their models, and a canary path. If a migration costs your team 18 days, budget it every year per model in production. If it costs 3, you have options.

Embeddings: cheap to recompute, expensive to re-trust

Switching embedding models means re-embedding every document, because vectors from different models live in different spaces. Teams fear the compute bill. Do the arithmetic first. The copilot's KB has 5,000 articles in about 40,000 chunks of 400 tokens: 16 million tokens. At voyage-4's $0.06 per million (or OpenAI's text-embedding-3-small at $0.02), re-embedding costs about one dollar. Even a billion tokens of ticket history is $60.

The real cost is everything tuned to the old vector space: similarity thresholds (the semantic-cache threshold from Production AI Platform: Caching: two kinds, two different risk profiles, the "low retrieval score → escalate" check from 4.4), retrieval eval baselines (Evals 3: Evaluating RAG: retrieval and generation, separately), and a period running both indexes while you compare. A threshold of 0.80 on one model means nothing on another. Plan the switch as: build the new index beside the old one, re-run retrieval evals, re-tune every threshold, then cut over. Keep the source text and chunk ids, never only the vectors.

The exit kit: what to keep so you can leave

Portability is mostly a set of things you keep, owned by your company, in formats you control. If you have all of these, a migration is a project of days. If you are missing them, it is a project of months, whatever your gateway does.

  1. Traces and outcomes. Every request, tool call and final draft, with the human outcome (sent, edited, discarded, reopened). This is the raw material for any new eval set and for pricing a switch.
  2. The gold set and its labels. The cases, the expert verdicts and the critiques (Evals 1: Versioning and keeping the set alive). This is the asset that tells you whether a new model is good enough.
  3. Prompts, per model, with history. Versioned with the model each was tuned on and the eval scores it reached, so you know what "good" looked like.
  4. Source text for every embedding. Chunk text and ids, so a re-index is a script, not an archaeology dig.
  5. Fine-tuning data, if you fine-tune. The fine-tune dies with its base model (OpenAI states that fine-tuned models shut down with their base); the training data is what survives.
  6. Contract terms. Data export, retention, notice periods, and how committed-spend discounts end. A committed-spend deal that is cheaper per token can cost more in total if it stops you moving when a model is retired.

Check the kit once a year by pretending you must leave in 60 days, the minimum notice Anthropic gives before retiring a model. Whatever you would be missing is your real lock-in.

Traps

Check yourself

Question 1

Your team wants to route the copilot's 162 "normal" tickets a day (billing, refunds ≤ $50, account) to Haiku 5.5. The Sonnet loop costs $0.041 per normal ticket and the Haiku loop $0.002. A shadow test shows Haiku's drafts are discarded 1.5 points more often on these tickets; a discarded draft costs $3.00 of agent time. Does the route pay? What would you check before deciding?

Show answer

Break-even gap = ($0.041 − $0.002) / $3.00 ≈ 1.3 points. The measured 1.5-point gap is above it, so the route loses money: 162 × 0.015 × $3 ≈ $7.30 a day of rework against 162 × $0.039 ≈ $6.30 of savings. Before deciding, check the uncertainty (a 1.5-point gap from a few hundred pairs has an interval of ±2 points or more, so you cannot claim either side), and split the class: refunds ≤ $50 carry money risk (a wrong refund costs far more than $3), so they should stay on Sonnet whatever the average says. Billing and account might be routable on their own if their gap is small.

Question 2

A vendor pitches a learned router: "RouteLLM-style, 2× cost reduction with no quality loss." Your traffic is support tickets, not chat. Using what the RouteLLM paper and later benchmarks report, what two things do you ask for before a pilot?

Show answer

(1) Results on your own traffic, or at least on a domain like it. The 2×+ figure (3.66× at CPT 50%) is on MT Bench chat; on MMLU and GSM8K the paper's best routers gave 1.41× and 1.49×, and some routers trained on Arena data alone did worse than random until ~1,500 in-domain labels were added. RouterEval and LLMRouterBench found many routers do not beat the best single model. (2) A comparison against the simple baselines: rules on your existing intent labels, and the strong model at lower effort. Then require per-route regret sampling in the pilot, with the alert threshold set at your break-even gap.

Question 3

The CFO sees the year-one numbers: Buy B (vendor AI agent, $0.99 per resolution) ≈ $50K, partner ≈ $186K. She asks why you would ever partner. Volume is forecast to grow from 400 to 1,500 tickets a day in two years. Give the answer with the crossover math, and one non-cost reason that could flip it either way.

Show answer

Steady state, partner ≈ $107K fixed a year (half an engineer plus infra) + $0.048 per ticket; Buy B ≈ 0.35 × $0.99 ≈ $0.35 per ticket. Crossover ≈ $107K / $0.30 ≈ 360K tickets a year ≈ 1,000 a day. At 1,500 a day (≈ 550K a year) partner costs ≈ $133K vs ≈ $190K for Buy B, so partnering wins on cost by year three, if your agent resolves as well and half an engineer is really enough (the common failure is that it takes 1.5). Non-cost flips: if the AI is part of what you sell (product, not internal tool), partner wins on control; if the vendor's actions cannot express your refund rules safely, buy loses regardless; if you have no eval discipline, partner's quality risk can outweigh the savings.

Question 4

An engineer proposes a two-week project to fine-tune a small open-weights model for "easy" tickets and self-host it, to "own our AI". The copilot handles 400 tickets a day. Argue the case against in numbers, then name the condition under which you would revisit it.

Show answer

The easy-ticket loop costs $0.024 on Sonnet and $0.0012 on Haiku: about $140 a month in total savings even before self-hosting. An always-on GPU server (plus a second for redundancy) costs more per month than the copilot's entire AI line ($1,200), and the model needs an owner, evals, and its own migrations. The fine-tune is also tied to its base model and loses its advantage when a better general model ships (the BloombergGPT lesson). Revisit only if volume grows by orders of magnitude on a narrow, stable task, if data rules forbid sending tickets to an API, or if evals show a frontier model cannot reach the quality bar with prompts and retrieval.

Question 5

Leadership asks for a "multi-vendor strategy so we are never locked in". You have one quarter. Using the switching-cost math and the deprecation record, what do you build, and what do you explicitly not build?

Show answer

Build: (1) an eval suite that runs on any model and produces per-slice results; (2) prompts versioned with the model they were tuned for; (3) a shadow/canary path in the gateway; (4) one standby model with its own prompt, evaluated monthly; (5) a weekly deprecation check with a named owner. These make the yearly forced migration (recent Claude models retired 12–16 months after snapshot; at least 60 days' notice) cheap, and a vendor switch becomes cheap as a side effect. Do not build: a lowest-common-denominator abstraction that drops caching, batch or structured outputs — those features save more than the switch ever would (an 18-day switch to save 30% on a $504/month loop pays back in about 9 years), and translation layers often drop unsupported fields silently.

Question 6

You must switch embedding models because the current one is being retired. Re-embedding the KB costs about $1. A junior engineer schedules it as a one-hour job. List what actually has to happen before cutover, and why each step exists.

Show answer

Vectors from different models are not comparable, so everything tuned to the old space is now meaningless: (1) build the new index beside the old one from stored source text and chunk ids (never only vectors); (2) re-run retrieval evals (recall@k on labeled article ids) on both; (3) re-tune every similarity threshold — the semantic-cache threshold, the "low retrieval score → escalate" check in the cascade, any dedupe thresholds — because 0.80 on one model means nothing on another; (4) re-check end-to-end draft outcomes on a gold set, since retrieval changes shift answers; (5) cut over with the old index kept for rollback. The dollars are trivial; the risk is a silent quality and cache-correctness drop.

Sources

Next

Sourcing is decided. Page 3 covers how to charge customers for AI features, where to place long-term bets, and a cost model and business case you build for the copilot.