Zenaique

Identify the three highest leverage sources of vendor lock in in a hosted LLM stack

Flashcard·Medium·4.0 · 0·~30s·Asked atFreshworksShield AiUipath
Attempt it
TL;DR

Prompts tuned to one model's quirks, provider-specific API features, and fine-tunes, sneakiest to most obvious, each requiring a different mitigation.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture moving apartments. The obvious furniture (a fine-tune) is hard to take with you. The light fixtures you installed for the wiring of this specific building (provider-specific features like structured outputs) come down with effort. The sneakiest cost is the muscle memory: you have arranged your kitchen for this layout, and the new place needs you to relearn where everything goes (prompts tuned to one model's quirks). When teams worry about lock-in they look at the furniture and the fixtures and forget the muscle memory, which is where most of the porting hours actually go. The mitigation strategy looks different for each: gateways for the shape, parity tests for the features, and discipline on what you fine-tune.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Vendor lock-in in LLM stacks is widely misunderstood. The default mental model, copied from the database world, is that lock-in equals the cost of rewriting API calls, and the mitigation is an abstraction layer. With LiteLLM in place, that surface is almost free. Yet teams that swap providers consistently discover that the actual porting work is 10x larger than the call-shape work.

This explanation breaks lock-in into the three layers where the cost actually lives, ordered by how often teams underestimate them. For each, it describes the mechanism, names the mitigation, and explains why the obvious tools (gateways, abstractions) only address a slice of the problem.

Layer 1, Prompt-tuning lock-in (the sneakiest)

Every prompt in a mature stack has been iterated against one specific model. The iterations encode the model's tokenization, verbosity defaults, refusal phrasing, tool-call schema, and implicit chain-of-thought behavior. The prompt that pulls 92% accuracy from Claude Opus 4.7 might pull 78% from GPT-5.5 unchanged, not because GPT-5.5 is worse on the underlying task but because the prompt is shaped for Anthropic's specific behavior.

The pernicious part is that prompts compile and run on the new provider with no error. Quality just drops, often silently, until eval-CI catches it or production metrics regress. Teams that have never measured cross-provider parity routinely discover at swap time that a quarter of focused prompt-tuning is the actual porting cost. The mitigation is a parity sentinel: a small subset of the golden set runs against a secondary provider on every prompt change. Promptfoo, DeepEval, and Ragas all support multi-provider configurations. The parity delta becomes an early-warning signal so that when the day to swap arrives, the team knows which prompts will need work and which port cleanly.

Layer 2, Provider-specific feature lock-in (the middle)
Layer 3, Fine-tune lock-in (the most obvious)
Why the gateway alone does not solve any of this
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • OpenAI structured outputs adopted in a JSON-extraction pipeline; the call site becomes non-portable to Anthropic without rebuilding the validation layer.
  • Anthropic prompt caching with explicit cache_control breakpoints used to cut RAG costs by 80%; the savings disappear when routing to GPT-5.5.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow would you build a parity eval-CI suite that catches prompt-tuning lock-in early without doubling your eval cost?
A

Run the full golden set on the primary provider on every prompt change. Run a smaller sentinel subset (50-100 representative examples) on the secondary provider on the same change. Surface the parity delta as a CI annotation, not a blocking gate. When the delta exceeds a threshold, flag for human review. Promptfoo and DeepEval both support this multi-provider configuration natively. The sentinel-subset pattern keeps cost bounded while preserving the early-warning signal.

1 more follow-up an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Only thinking about the fine-tune. The prompt-engineering tax dwarfs it in most stacks because every call site has been silently optimized for one vendor's behavior.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • The three sources of lock-in (prompts, features, fine-tunes) and why their costs are not interchangeable

  • Why prompt-tuning lock-in is sneakier than the others and how to surface it early

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Why a circuit breaker around the primary LLM provider is more than a fancy retry
Flashcard·Medium