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







