liveBook · Manning

Vendor lock-in

As explained in Designing AI Systems

Vendor lock-in is dependence on a provider's technology or interfaces that makes switching to alternatives difficult or costly.

Vendor lock-in is dependence on a provider’s technology or interfaces that makes switching alternatives difficult or costly. In AI applications, direct provider integration couples application logic to message formats, response parsing, token fields, API methods, and error handling. A provider abstraction moves those differences behind a consistent interface, so applications can change models or providers without being rewritten. section 1.6 section 3.2.1

Provider lock-in produces several operational and organizational costs:

  • An outage at a directly integrated provider can take the application down instead of allowing traffic to route to another provider. section 3.2.1
  • Provider-specific message structures and response locations force application changes when another model is added. section 3.2.1
  • Inconsistent token fields complicate organization-wide cost tracking unless usage is normalized into a shared format. section 3.2.1
  • An adapter-based Model Service makes provider changes a configuration and integration task rather than an application rewrite. section 1.6 section 3.2.1

Adding a fallback provider

An intake assistant written directly against OpenAI may require changes to message construction, response parsing, error handling, and usage accounting before it can use Anthropic. With a Model Service, an Anthropic adapter and configuration change provide the fallback while application logic remains stable. section 3.2.1

Table 3.1 Variations in LLM provider formats
Aspect
OpenAI
Anthropic
Google (Gemini)
System prompt
In messages array as role: "system"
Separate system parameter
In messages array
Message structure
{role, content}
{role, content}
{role, parts}
Response location
choices[0].message.content
content blocks array
candidates[0].content
Token field names
prompt_tokens, completion_tokens
input_tokens, output_tokens
promptTokenCount, candidatesTokenCount

Compare the provider differences that an abstraction must normalize: system prompts, message structures, response locations, and token field names. section 3.2.1

How Designing AI Systems covers it

How deep it goes
Explains operational causes, organizational costs, normalization needs, and adapter-based mitigation without providing implementation code.
Examples
Uses OpenAI, Anthropic, and Google Gemini formats, plus an outage fallback and token-usage normalization scenario.
What it assumes
Assumes familiarity with direct provider integrations while making the architectural boundary and provider differences explicit.
What you can do after
Evaluate provider choices and apply a Model Service with adapters to switch providers without rewriting application logic.
How it connects
Connects provider abstraction with Model Service, adapters, multi-provider support, cost tracking, experimentation, and A/B testing.

Also explained in

Compare how 8 books explain vendor lock-in →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Systems. The section links point to the parts of the book it draws on.