Avoid AI vendor lock-in: make your exit work before you need it

Keep provider settings separate from application code, test a second endpoint and document what it takes to move.

Check that your model, data and licence can move with you.

Step 01 / 03

Make the provider configurable, then test a replacement

A familiar request format can reduce integration work, but it does not guarantee the same behaviour.

  • Keep the endpoint address, API key and model ID in configuration. Avoid spreading provider-specific assumptions through the application.
  • Test the features your product uses. For our support product, both the reply model and the ticket sorter need tests.
  • Our serverless endpoint is https://api.lyceum.technology/openai/v1. You can use it with an OpenAI-compatible client and a model ID from our library.
  • The example below tests one request. Run your application’s full acceptance tests before switching traffic.
Before moving on: complete a representative task through a second endpoint and record any application changes it needs.
Exhibit 2A provider that handles chat well may still return categories in a different formattest grid · customer replies · ticket sorting
FeatureRepliesSorting
Answer quality and response time☐☐
Function calls and their arguments☐☐
Structured responses, such as JSON☐☐
Streaming, errors and usage reporting☐☐
The amount of input and output each request can contain☐☐
Source Illustration for the hypothetical support product; Lyceum
Example: keep provider settings outside the codePython
import os
from openai import OpenAI

client = OpenAI(
    base_url=os.environ["LLM_BASE_URL"],
    api_key=os.environ["LLM_API_KEY"],
)
reply = client.chat.completions.create(
    model=os.environ["LLM_MODEL"],
    messages=[{"role": "user", "content": "Summarise this ticket."}],
)
print(reply.choices[0].message.content)
Step 02 / 03

Write an exit plan and rehearse it

A rehearsal gives a migration time based on your application; prioritise the feature with the least time to move.

  • Give the plan an owner and a test date. List everything the move depends on, including services beyond the model API.
  • Record the replacement (endpoint, model, account, access), the data to export and where it goes, application changes (prompts, tools, retrieval), validation requirements, and how traffic moves and switches back.
  • Add the contract: notice periods, commitments and termination terms. A preview model or one with a known retirement date may need attention before a stable production model.
  • Rehearse the move in a test environment. Include setup, data transfer, integration fixes and validation in the time you measure. Update the estimate when the model, provider or workflow changes.
Before moving on: have a tested exit plan, a measured migration time and a working way to switch back.
Exhibit 3Move the preview ticket sorter first: 1 week of notice left, against 25 for the reply modelweeks of notice left, with 1 week needed to move
reply model · 26 weeks notice
25 weeks
ticket sorter · preview · 2 weeks notice
1 week
Source Two hypothetical retirement notices, not provider commitments. Replace the migration time with a measured rehearsal.
Step 03 / 03

Check that the model and its licence can move

Availability does not settle the licence: “open weights” and “open source” are not interchangeable labels.

  • Open weights are the trained model files made available to download. They can make it possible to run the model with another provider or on your own infrastructure.
  • Read the terms for the exact version you plan to use. Check whether your intended use, redistribution or customer-facing service is permitted, and which conditions apply.
  • If you have a fine-tuned model or an adapter, check that you can export it. Then load it at the intended destination with the required base model and serving software.
  • Check memory, storage, deployment support and the cost of operating the replacement. Downloadable weights do not make those costs disappear.
Before relying on portability: run the exact model or exported files at the destination and confirm both the results and licence terms fit your use.
Exhibit 4Weights you can download still need a licence check, an export and a test at the destination
licence · exact versionintended use permittedrecord model version, licence link and review date
01 · exportfine-tuned model or adapter
02 · loadat the intended destination
03 · testbase model · serving software
Source Lyceum

Your next workload starts here