Skip to content
mentoor

Topic 3 of 5 · 4 min read

Reducing dependence on one model vendor

Goal: Assess one product's dependence on a single model vendor and choose mitigations that match the risk.

Rank the ways one model vendor can hurt your product, then spend effort only where the damage would be large. Total independence is expensive and rarely needed. A matching mitigation for each real risk is enough.

Check yourself · 1 of 3

A product has one feature where downtime hurts customers and four where a delay does not matter. Where should the fallback provider go?

Choose one answer

Why it matters

If your product is a thin layer over one provider's API, that provider decides your uptime, your costs, your rules and your data handling. It can have an outage, raise prices, change a usage policy, retire a model, or change how it handles your data. One of these will happen in a product's life. The question is how much it would cost you when it does.

How to do it

  1. List the risks for each feature: outage, price rise, retired model, policy change that blocks a use case, data terms you cannot accept, and rate limits at peak traffic.
  2. Score each by likelihood and damage. Damage is concrete: "chat is down for two hours and 300 support chats stall" or "a price doubling takes our margin to zero."
  3. Pick a mitigation that fits the score. The usual options, from cheap to costly:
    • Timeouts, retries and a clear error message, so an outage does not look like a crash.
    • A thin abstraction layer or gateway between your code and the provider, so prompts, model names and keys live in one place and a switch is a config change.
    • A second provider as a fallback, tested regularly with your evaluation set, for features where downtime is costly.
    • An open-weight model you can host yourself, as a floor for essential features. It is usually weaker, so check the quality honestly.
    • Contract terms: notice periods for changes, data retention and training terms, service levels, and the right to leave.
  4. Test the fallback. A second provider never exercised in production often fails when needed, because the prompts were tuned for the first one.

Before and after

Before: "We use one vendor everywhere because it is simplest." During a four-hour outage, the in-app assistant, the email drafting and the nightly summaries all stop.

After: a table shows the assistant is the only feature where downtime hurts customers. The team puts a gateway in front, adds a second provider for the assistant only and runs the evaluation set against it each month. Summaries stay single-vendor with a retry, because a late summary costs little.

Optional: how it looks in code

const providers = ["primary", "secondary"];
for (const p of providers) {
  try { return await callModel(p, request, { timeoutMs: 8000 }); }
  catch (err) { log.warn("model call failed", { provider: p }); }
}
throw new UserFacingError("The assistant is unavailable. Try again in a few minutes.");

What goes wrong

  • Building fallbacks everywhere, which doubles the evaluation work for features that do not need it.
  • An untested backup whose prompts never worked on the second model.
  • Ignoring data terms until a customer's security review asks.
  • Adding a gateway but calling the provider's special features directly, so the switch is not really free.

Examples

A risk table

Risk Likelihood Damage Mitigation
Provider outage Medium Assistant down, support queue grows Second provider for the assistant
Price doubles Low Margin falls to zero Gateway plus monthly price check
Policy blocks medical questions Low Feature must be removed Legal review, open-weight option studied
Data used for training Low Customer contracts breached Data terms checked before launch

The gateway that did not help

A team added a gateway but wrote the prompts around one provider's special tool format. When they tried the second provider, 30 percent of the test cases failed. The fix was to test the fallback monthly and keep the prompts in a neutral format.

Key points

  • List the vendor risks per feature: outage, price, retirement, policy, data terms and rate limits.
  • Score each risk by likelihood and by concrete damage, and match the mitigation to the score.
  • A thin gateway keeps model names, prompts and keys in one place so a switch is a config change.
  • A fallback provider or open-weight model only helps if you test it against your own evaluation set.
  • Contract terms such as notice periods, data retention and exit rights limit the damage that code cannot.

Common mistakes

  • Treating vendor dependence as either a non-issue or something to remove completely.
  • Adding a second provider and never running the evaluation set against it.
  • Reading data terms only after a customer asks about them.
  • Putting provider-specific calls all through the code so the abstraction layer protects nothing.

Check yourself · 2 of 3

What does a thin gateway between your code and the model provider mainly give you?

Choose one answer

Check yourself · 3 of 3

Why should a second provider be tested with your evaluation set before an outage?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic