Skip to content

Reducing AI vendor lock-in ​

Type: architecture discussion. Status: a concept and design example, not a report of verified load tests.

The problem ​

When a workflow depends entirely on one service, quotas, pricing changes, availability and API evolution become a team problem. This is vendor lock-in: dependence on a supplier.

Context ​

This concerns development with AI agents, where the coding client and model can be separate. For example, OpenCode can be the client, with DeepSeek, Z.ai/GLM or Kimi providing models when suitable APIs and access terms permit it.

Options and trade-offs ​

ApproachBenefitsTrade-offs
One provider and its CLILess configuration, integrated experienceSingle point of failure, dependence on prices and policies
Independent client + multiple APIsModel switching, cost and quality comparisonDifferences in tool calling, context, caching and behavior
Self-hosted API gatewayCentralized configuration and controlOperations, latency, cost and a new point of failure
Local modelsInfrastructure and data controlHardware requirements, limits in quality and tool support

A starting approach for an experiment ​

For a personal AI coding workflow, start by evaluating an independent client and several compatible APIs, without building a gateway prematurely. OpenCode is a candidate, not a universal best choice.

See the OpenCode setup guide and Claude Code CLI.

Risks ​

  • Compatibility: a shared API protocol does not mean identical model capabilities or agent behavior.
  • Security: the agent accesses the project, and the API provider receives submitted context. Review data policies.
  • Cost: compare full request costs including output, context, caching and retries.
  • Terms: network reachability does not establish permission to use a service in your region.
  • Operations: test fallback on real tasks, not just a successful ping.

How to evaluate the solution ​

  1. Choose a representative repository without secrets.
  2. Repeat the same tasks on each model.
  3. Measure cost, time, diff correctness and tool behavior.
  4. Simulate the primary provider being unavailable.
  5. Record CLI, OS, model versions and results.

Until these checks are completed, there is no evidence that the system is fault tolerant. Multiple configured providers do not provide automatic failover.

Conclusion ​

Independence is the ability to switch in a controlled way without losing security or predictability, rather than the number of connected models. In architecture this is reducing vendor lock-in; in relationships, it might be called keeping your options open.

Last updated:

Beyond the Prompt · Test first. Explain second.