One square on the left connects to two squares on the right, one by a solid line and one, filled purple, by a dashed line, suggesting a second provider the same code can reach.

The short answer

Test your exit while you are not in a hurry. A preview model is an early release; its retirement terms depend on the provider and product. For a generally available model, check the contracted notice period, as our model deprecation risk guide explains. An exit you have never rehearsed turns into a scramble.

How do you stop depending on one LLM provider without rewriting your product? It comes up when a price rises or a model is retired.

Lock-in has three parts, and each step below handles one. Your code is tied to one provider's API (application programming interface, the request format your code sends). Your plan for leaving is missing or untested. Your models cannot move, because you lack their files or licence terms.

One example runs through this guide. Take a support chat product with two models behind it: a reply model, and a small model that sorts incoming tickets. The reply model is generally available. The ticket sorter runs on a preview model.

ModelMinimum notice before shutdownRehearsed move (assumed)Spare time
Reply model, generally available26 weeks, assumed1 weekAbout 25 weeks
Ticket sorter, preview2 weeks, assumed1 week1 week

Every time input is hypothetical: both notice periods and the one-week rehearsal are assumptions, not provider commitments or measurements. The example shows that short notice leaves little room to learn a migration. It does not show how long your own move takes. The spare time is the notice minus the rehearsal: 26 minus 1 is about 25 weeks, and 2 minus 1 is 1 week. Only a test run tells you your own number.

Hypothetical notice periods of 26 and 2 weeks, with an assumed one-week rehearsal, leave 25 weeks and 1 week. All inputs are assumptions, not provider commitments.
In our hypothetical example, the assumed notice periods and one-week rehearsal leave 25 weeks and 1 week to spare.

Step 1: Provider alternatives

Read this if your product calls one provider.

Lock-in starts with the API your code calls. Many providers accept the same requests as OpenAI's API, which we call an OpenAI-compatible API, so code written for one often works with another. Suppose your application already uses the OpenAI client library (the package that sends these requests). Our guide to cloud AI alternatives explains the configuration changes to test. One is a new base URL (the address the client sends requests to). The other is a new API key.

Compatible does not mean identical. Sampling settings (parameters that control how random the output is) can behave differently on each side. So can structured outputs (replies in a fixed format, such as JSON). Test with your own prompts, as our multi-provider failover guide explains.

Compare alternatives on the question that matters to you:

Lyceum is a sovereign European AI inference provider for open-source models, with serverless models in Paris and Finland. Our serverless inference is one such alternative. You call open models through one OpenAI-compatible API, billed per token with no base fee. Moving in means changing the endpoint address in your settings. Moving out also starts with a configuration change, followed by tests of the replacement endpoint and model.

To keep your code free of provider details, read them from environment variables:

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)

Our endpoint is `https://api.lyceum.technology/openai/v1`. Set it as `LLM_BASE_URL`, put your Lyceum API key in `LLM_API_KEY`, and pick a model ID from our models page. Use the script to test our endpoint and another compatible endpoint with the appropriate model ID.

Your code reads a base URL, API key and model ID from settings to reach a replacement endpoint. The move is accepted only after its responses pass your tests.
For our client example, you change three settings, then test the replacement endpoint and model against your acceptance criteria.

Step 2: Exit planning

Read this if you have no written plan for a provider change.

  • Before a pilot: pilot exit criteria write down stop conditions and who holds the data and files before work starts.
  • Model retirement: pinning a version means fixing the exact model version you call. Record the support terms and prepare for a future retirement. Ask for the notice period in writing, as in model deprecation risk.
  • A second path: multi-provider failover puts a second endpoint behind the same code. Failover is switching automatically to the second endpoint. Define separate handling for rate limits and gateway timeouts rather than treating every failed request alike. A failover to another region can also break your data residency promise.
  • Custom models: a fine-tune is a model trained further on your data. A LoRA adapter is a small add-on file that stores only the fine-tune's changes. Porting fine-tunes between providers requires checking the adapter format, base-model version and serving support. Export your configuration and evaluation set too, then repeat the tests on the destination.
  • Where to run: self-hosting versus managed lists four requirements for independence. They are where data is processed, who can access it, whether you can move, and who operates it. Renting cloud servers to self-host still leaves you depending on the company that rents them.
  • Buying: the vendor risk checklist goes to shortlisted vendors.
  • Infrastructure: a multi-cloud GPU strategy keeps GPU work portable.

The law now supports leaving. Chapter VI of the EU Data Act sets minimum rules for cloud providers (companies that rent out computing), so that customers can switch. The Act applies since 12 September 2025.

The ticket sorter has the least spare time, 1 week, so rehearse its move first. Force a failure in a test environment, change the base URL, API key and model ID, and time the run. That number replaces our assumed week.

Step 3: Open model trust

Read this if you want models you can move, and need to know what you may ship with them.

Open weights (the learned numbers of a model, published so you can download and run them) are what let a model move between providers. We want you to run open models you can inspect and move, on GPUs in European data centres. In October 2025, Epoch AI measured a three-month average lag for frontier open-weight models on its Epoch Capabilities Index. That is an average, not parity on every task.

Movable does not mean free of conditions. Open source licences, in brief, allow software to be freely used, modified and shared. Many model licences add conditions, and the open model licences guide compares them. Three points matter most:

  • A licence that makes you ask the licensor for permission is not open source. Write "open weights" for such a model in your notes.
  • Check whether the licence distinguishes internal use from a customer-facing service. Identify any conditions that apply when customers receive outputs. Check the full licence for any customer-facing feature.
  • Look for the licence attached to the exact model version you plan to use. On the Hugging Face Hub, a licence can be specified in a repository card’s metadata; check the full licence terms too. Record that link and the date you read it beside the model version you use.

Where to start, by situation

  • You call one provider and have no second path: run the script above against a second endpoint with your own prompts.
  • A model you use is a preview or has a retirement date: rehearse its move first, as in Step 2.
  • You fine-tuned a model: if an export is available, test its compatibility on the intended destination before you need to move.

If you do one thing, move one real request to a second endpoint and time it. When you are ready to compare costs, see our inference pricing.

Sources

  1. digital-strategy.ec.europa.eu
  2. epoch.ai
  3. opensource.org
  4. huggingface.co