From Sanskriti Khandelwal | Product & Market Analysis
AI Vendor Lock In: Measuring What It Actually Costs to Switch Models
On this page
Swapping one model provider for another is a small code change. Most teams finish it in a day. AI vendor lock in is real, but it does not live in the API call. It lives in the prompts, the evals, the embeddings and the fine-tunes underneath it, and only one of those four can be ported at all.
Key takeaways
- The market has already voted, and it says switching happens. OpenAI's share of enterprise LLM API spend fell from 50% in 2023 to 27% in 2025, while Anthropic went from 12% to 40%. That reallocation is not what a locked market looks like.
- The API call is the cheapest layer and the only one anyone measures. Provider request shapes have converged far enough that the swap itself is usually hours. Proving the new model does the same job is what takes weeks.
- Embeddings and hosted fine-tunes do not move at all. A vector only carries meaning inside the model that produced it, and a hosted fine-tune's weights are not yours to export. Both are rebuilds, not migrations.
- You will migrate on the provider's calendar whether you choose to or not. Anthropic retired 9 models from its API between October 2025 and August 2026, and Claude Opus 4.1 was switched off 61 days after its deprecation notice.
The short answer
You are less locked in than the phrase suggests, and more exposed than your budget assumes. Moving the API call takes hours. Re-tuning prompts, rebuilding an eval suite, re-embedding a corpus and re-training a fine-tune takes weeks to months. The binding constraint is calibration, not contract.
What lock in means when the vendor is a model
Cloud lock in is a data gravity problem. Your files sit in one provider's storage, egress is billed, and moving petabytes is slow and expensive.
Model lock in works differently, and the difference is the reason most switching estimates are wrong. Very little data has to move. What has to move is a set of calibrations that were tuned, often without anyone noticing, against one model's behaviour.
Those calibrations are invisible in the codebase. A prompt that says "answer only with valid JSON" looks portable. It is portable in the sense that it will run. It is not portable in the sense that it will keep working.
This is the specific thing to hold on to. Model switching cost is not measured in gigabytes or in exit fees. It is measured in how much of your quality assurance you have to redo, and how confident you are in the answer when you finish.
The five layers of switching cost, ranked by how hard they move
Break a production AI system into layers and the cost distribution becomes obvious. It is heavily skewed, and it is skewed away from the layer teams instinctively worry about.
| Layer | What transfers | Typical effort | What breaks quietly |
|---|---|---|---|
| 1. API call and SDK | Almost all of it. Request shapes have converged. | Hours | Parameters one provider accepts and another rejects |
| 2. Prompts and output formats | The text. Not the reliability. | Days | Format compliance on edge cases, not on your samples |
| 3. Tool and function definitions | The schema. Not the calling behaviour. | Days to weeks | When the model decides to call a tool, and how often |
| 4. Eval suite and thresholds | The test cases. Not the pass marks. | Weeks | Nothing. It fails loudly, which is the point of it. |
| 5. Embeddings and fine-tunes | Nothing. These are rebuilt. | Weeks to months | Retrieval quality, gradually, during a rolling reindex |
Effort ranges are ordinal, not measured. They reflect the sequence and relative weight of the work, not a benchmarked duration for any particular system. Treat the ordering as the claim and the durations as an illustration.
The two layers that are genuinely cheap
Start with the good news, because it is real and it is under-reported.
The API call moves in a day
Five years of competition has pushed provider request formats toward each other. Messages, roles, system instructions, streaming, tool schemas: the shapes now rhyme closely enough that a well-factored client swaps in an afternoon.
Most major providers also expose an endpoint that accepts requests in a competitor's format. That was a competitive move, not a standards effort, and it is the single largest reason model-layer lock in is weaker than cloud-layer lock in.
The exceptions are worth naming because they are exactly where naive ports break. Anthropic now returns a 400 error if you set temperature, top_p or top_k to a non-default value on its newer models. Any code written against the shared vocabulary of 2024 sends those parameters by habit.
Prompts move, but their reliability does not
A prompt is text. Text copies perfectly. What does not copy is the tuning you did against one model's failure modes.
A January 2026 preprint measured this on structured extraction across six model families. The author reports a cross-model portability gap of 0.4 to 0.6 F1 points, driven mostly by format collapse rather than by any loss of understanding. One model returned clean JSON. Another wrapped the same JSON in prose or fences and failed the parser.
Read that result carefully, because it is a single-author preprint on one task domain and it has not been peer reviewed. What it demonstrates is a mechanism, not a universal constant. The mechanism is that most of the observed gap was recoverable by canonicalising the output, which tells you the new model knew the answer and expressed it differently.
That is my working position on prompt portability. Assume the semantics carry and the formatting does not. Then write your parsers to be tolerant before you migrate, not during.
Evals are where the migration bill actually lands
Here is the part nobody puts in the estimate. Switching model is trivial. Knowing whether you should have is not.
What the suite has to cover before a switch is safe
An eval suite built to answer "is this release better than the last one" is not the same instrument as one built to answer "is this different model acceptable". The first can lean on relative comparison. The second needs absolute thresholds you are willing to defend.
You need coverage of the failure modes you have actually seen in production, the format contracts your downstream systems depend on, and the cases where a wrong answer is expensive rather than merely wrong. Teams that have not built this find out that their confidence in the incumbent model was never measured. It was accumulated.
If you have not written one, the sequence for building it is covered in the walkthrough on how to build an LLM eval suite that survives a model change. Build it before you need it, because building it under migration pressure guarantees you will grade the new model against the old model's habits.
The cost is judgement, not compute
Running evals is cheap. A comparison run against a few hundred cases costs less than an hour of engineering time.
Deciding what counts as a pass is the expensive part, and it cannot be automated away. Someone with domain authority has to look at 50 disagreements between the old model and the new one and rule on each. That is the work, and it scales with how many distinct jobs your system does.
There is a reason this section is short and the claim in it is strong. I have not found a public dataset that measures migration engineering effort across organisations, which means the honest version of this argument is structural rather than quantified.
Embeddings and fine-tunes do not move at all
The bottom two layers are different in kind, not in degree. They are not slow to port. They cannot be ported.
A vector only has meaning inside its own model
Two embedding models can both emit 1,024 numbers for the same paragraph. The numbers describe different geometries, and no conversion function exists between them, because the spaces were never aligned.
Changing embedding model therefore means re-embedding the whole corpus and rebuilding every index. The compute is usually affordable. The risk is the rolling window, when the index holds vectors from two models at once and retrieval quality varies by document age rather than by relevance.
This is also the layer where hosted convenience converts most directly into exposure. Use a provider's embedding API and your retrieval system inherits that provider's model lifecycle. When they retire a version, you reindex on their schedule.
Fine-tunes are the one place the weights matter
A fine-tune of a hosted proprietary model is reachable only through that provider's API. You cannot export the adapted weights, so there is no artefact to carry anywhere.
Open weights are better here, though less portable than the pitch suggests. A LoRA adapter is a small file, but it is bound to the exact base model it was trained against. Researchers describing data-free transfer of adapters across heterogeneous models are working on the problem precisely because direct reuse does not work. Change the base and you retrain, assuming you still hold the training data.
That last clause is where teams get caught. The fine-tuning set is often assembled once, used once, and never treated as a durable asset. Keep it versioned and keep it exportable, and the fine-tune layer drops from a rebuild to a re-run. That, and not the adapter file, is the portable thing. The full comparison of what open weights buy and cost in production is in the review of open weight models against hosted APIs.
Why abstraction layers help less than the pitch
The standard answer to lock in is a gateway. Route everything through one interface, keep providers interchangeable, sleep well.
Gateways are worth running. They are just solving a narrower problem than buyers think they bought.
| A gateway handles this | A gateway cannot handle this |
|---|---|
| One request format across many providers | Prompts tuned to one model's formatting behaviour |
| Failover and retry when a provider degrades | Whether the fallback model is good enough to serve that traffic |
| Central key management, spend caps and logging | Provider-specific optimisations such as explicit cache breakpoints |
| Routing cheap traffic to cheap models | Eval thresholds that were set against the model you left |
The pattern in the right-hand column is consistent. A gateway abstracts the interface, and the interface was never the expensive layer. It also imposes a cost of its own, because the feature set it exposes tends toward what every provider supports.
Prompt caching is the clean example. One provider requires you to place explicit cache breakpoints inside the request. Another caches automatically with no code change. Both approaches work, and the code that captures the discount on one of them captures nothing on the other. Route through a common interface and you often forfeit the optimisation entirely, which shows up in the gross margin arithmetic rather than in any outage.
My position is that you should run a gateway for operational reasons and not count it as portability insurance. The framework trade-offs are argued in more detail in the piece on whether to use an orchestration framework or build the thin layer yourself, and the same logic applies to tool interoperability standards: a shared protocol moves the schema, not the behaviour.
You will migrate anyway, on the provider's calendar
All of the above assumes switching is a choice. Frequently it is not.
Anthropic publishes its retirements, and the record is unambiguous. Between 28 October 2025 and 5 August 2026, 9 models were retired from the Claude API. Claude Opus 4.1 was deprecated on 5 June 2026 and switched off on 5 August 2026, a gap of 61 days. Claude Sonnet 4 and Claude Opus 4, both released in May 2025, were gone by June 2026.
OpenAI runs longer stated minimums and has still moved fast on specific surfaces. Its published deprecation schedule shows the Assistants API announced on 3 June 2026 and shut down on 26 August 2026. On the same day it announced that reusable prompt objects would be removed, with the instruction to move that content back into application code.
Note what that second one is. A provider feature that stored your prompts for you was withdrawn, and the migration path was to stop depending on the provider for it. That is the shape of most model-layer lock in: shallow, real while it lasts, and resolved by moving state back to your side.
The notice periods are also not comparable across providers.
Anthropic commits to at least 60 days notice for publicly released models. OpenAI states at least 6 months for generally available models and at least 3 months for specialised variants, with preview models exempt from both. Amazon Bedrock keeps models available for at least 12 months before end of life.
The practical consequence is worth putting in a contract. Notice period is a negotiable term, it is rarely negotiated, and it is one of the few pieces of switching cost you can buy down in advance. The clauses worth asking for are set out in the CFO checklist of AI contract terms, and the provider-by-provider differences in the comparison of model provider terms.
Regulation is moving the same direction for the cloud layer underneath. The EU Data Act permits only cost-based switching charges during its transition, and from 12 January 2027 prohibits switching charges entirely for data processing services. It does not reach prompt tuning or eval rebuilds, which is precisely the point of this post.
Where this argument is weakest
Three places, and the first is the most serious.
The core claim is structural, not measured
I have argued that migration effort concentrates in evals, embeddings and fine-tunes. I cannot point you to a survey that measures engineer-days by layer across a population of firms. That dataset does not appear to exist publicly.
What I can point to is the mechanism: vectors are model-specific, hosted fine-tune weights are not exportable, and formatting reliability is model-specific by measurement. Those are established. The relative weighting between them is judgement, and you should treat the ladder chart above as an argument rather than a finding.
Market share movement is weaker evidence than it looks
The share shift from OpenAI to Anthropic is real and it is the strongest single fact in this post. It is also compatible with an explanation that has nothing to do with easy switching.
Most of that movement may be new workloads choosing a different provider rather than existing workloads migrating. A market growing this fast can reallocate share without anyone actually switching anything. Menlo's figures are shares of spend, not counts of migrations, and they cannot distinguish between the two.
Behaviour drifts even when you stay
The case for portability assumes the incumbent is stable. It is not. Peer-reviewed work in the Harvard Data Science Review found GPT-4's accuracy identifying prime numbers fell from 84% in March 2023 to 51% in June 2023 on the same questions.
A 2026 framework paper on governing updates in the LLM supply chain makes the same argument from the operations side, though its own validation is explicitly exploratory rather than comprehensive. If a version bump inside one provider can move behaviour that far, then the eval work described above is not a migration cost at all. It is the cost of running an AI system, and you owe it whether you switch or not.
That reframing cuts against my own headline. If evals are a standing cost rather than a switching cost, then genuine model lock in is smaller still, and it is concentrated almost entirely in embeddings and fine-tunes.
Frequently asked questions
Is AI vendor lock in real or overstated?
Both. The API layer is close to interchangeable, and enterprise spend shifted enough between 2023 and 2025 to show that buyers do move. The real lock in sits in embeddings, which must be rebuilt, hosted fine-tunes, whose weights you cannot export, and the eval work needed to prove a replacement is acceptable. Budget for those three and the fear becomes a line item.
How long does it take to switch LLM providers?
The code change is usually hours to a day, because provider request formats have converged. Re-tuning prompts for the new model's formatting behaviour takes days. Rebuilding an eval suite and agreeing thresholds takes weeks. Re-embedding a large corpus and re-training any fine-tunes takes weeks to months. Systems without embeddings or fine-tunes migrate far faster than systems with them.
Do abstraction layers like LLM gateways prevent lock in?
They remove one layer of it and leave the others. A gateway gives you one request format, failover, central key management and routing. It cannot carry prompts tuned to a specific model, eval thresholds set against a specific model, or provider-specific optimisations such as explicit prompt cache breakpoints. Run one for operational reasons, not as portability insurance.
Can I move a fine-tuned model to another provider?
Not if it is a hosted fine-tune of a proprietary model. Those weights are only reachable through the provider's API and cannot be exported. Open weight models are better, but a LoRA adapter is still bound to the exact base model it was trained on. The portable asset is your training data, so version it and keep it exportable.
What happens when a provider retires the model I use?
You migrate on their timetable. Anthropic commits to at least 60 days notice for publicly released models, OpenAI to at least 6 months for generally available models and 3 months for specialised variants, and Amazon Bedrock keeps models available at least 12 months before end of life. Preview and alias models can carry as little as 2 weeks.
Does a multi model strategy reduce switching cost?
It reduces the surprise, not the work. Running 2 providers in production means your prompts, parsers and evals already tolerate 2 sets of behaviour, so a third is incremental rather than novel. The cost is that every feature must be built to the narrower of the 2 capability sets. That trade is worth making for high-volume, well-defined tasks and rarely worth it for a single flagship workload.
Where to start this week
Run the inventory before you run the migration. It takes an afternoon and it is useful whether or not you ever switch.
List every place your system encodes an assumption about one specific model. Prompts with model-specific formatting instructions. Parsers tolerant of exactly one output shape. Eval thresholds set by comparison rather than by an absolute bar. Embedding indexes and the model version that built them. Fine-tunes, and whether you still hold the data that produced them.
Then write one number next to each: how many days to rebuild it. Total that column. That figure is your real switching cost, it is almost certainly larger than your team's guess, and it is the only version of this question you can answer for yourself rather than read in a report.
One thing to do next
Ask your current provider, in writing, what notice you get before a model you depend on is retired. Compare it against what your renewal actually says. The gap between the two is the part of your switching cost that a contract can fix.
References
- Menlo Ventures, 2025: The State of Generative AI in the Enterprise, December 2025. Survey of 495 US enterprise AI decision-makers, fielded 7 to 25 November 2025. Used for all enterprise LLM API spend share figures.
- Anthropic, Model deprecations, read 31 August 2026. Used for the retirement count, the Claude Opus 4.1 dates, the 60-day notice commitment and the temperature parameter deprecation.
- OpenAI, Deprecations, read 31 August 2026. Used for the stated notice minimums, the Assistants API shutdown and the reusable prompts removal.
- V. Kotte, PromptPort: A Reliability Layer for Cross-Model Structured Extraction, arXiv preprint, 6 January 2026. Used for the cross-model portability gap. Single-author preprint, not peer reviewed.
- L. Chen, M. Zaharia and J. Zou, How Is ChatGPT's Behavior Changing over Time?, Harvard Data Science Review 6.2, 12 March 2024. Used for the GPT-4 accuracy shift between March and June 2023.
- M. S. Chishti, D. P. Oyinloye and J. Li, Test Before You Deploy: Governing Updates in the LLM Supply Chain, arXiv preprint, April 2026. Used for the framing of update governance. The authors describe their own validation as exploratory.
- Cross-LoRA, A Data-Free LoRA Transfer Framework across Heterogeneous LLMs, arXiv preprint, 2025. Used for the base-model dependency of adapters.
- European Union, Data Act, Article 29, Gradual withdrawal of switching charges. Used for the 12 January 2027 prohibition on switching charges.
Weakest thing about this source base: the two arXiv items are preprints rather than peer-reviewed work, and one is a single-author paper on a single task domain. No public dataset measures migration engineering effort by layer, so the ranking in this post is reasoned from mechanism rather than measured across firms.
Related reading