Home/Blog/AI Architecture
AI Architecture

The AI Architecture Decision That Determines Whether You Can Ever Switch Providers

Direct answer · How do we avoid AI vendor lock-in?

Put a routing layer between your application and any model provider, and classify your data before choosing where each request goes. Applications that call a provider's SDK directly inherit that provider's pricing, model retirements and data-handling terms as architecture — switching later means a rewrite. With a thin abstraction, changing providers is a configuration change. The abstraction costs about a week to build and is close to impossible to retrofit cheaply once workflows are in production.

Summary

Most AI lock-in is not contractual. It is architectural, self-inflicted, and decided in week two of the pilot.

Lock-in is rarely written into the contract

Procurement reviews the contract. The contract is usually fine — most model providers have unremarkable commercial terms and no exit penalty. The lock-in arrives later and from a different direction: an engineer, reasonably, imports the provider's SDK and calls it directly from the code that does the work.

Eighteen months on, that import statement appears in ninety files. The provider changes pricing, retires the model version you built against, or compliance asks a question the terms do not answer — and what should be a vendor conversation is now a rewrite with a business case attached.

The seven questions to answer before you sign

We hand this list to clients before any AI vendor commitment. It takes an afternoon and has saved several of them a year:

  • 1. Which classes of our data may leave our boundary? Classify into public, internal, confidential and regulated first. Everything else follows from this and it is a business decision, not a technical one.
  • 2. Does this tier train on our submissions? Free tiers of the major providers generally use submitted content to improve their products; paid tiers contractually do not. Read the tier you are actually on, not the marketing page.
  • 3. What is the model retirement policy? Providers deprecate model versions. If your prompts are tuned to a version with a twelve-month life, you have a recurring project, not a purchase.
  • 4. Where is inference physically performed? Data residency questions arrive from enterprise customers and regulators, usually after you have shipped.
  • 5. What happens to our data at rest, and for how long? Retention windows for prompts and outputs vary widely between providers and tiers.
  • 6. Can we run an equivalent workload elsewhere tomorrow? If the honest answer is no, you have architectural lock-in whatever the contract says.
  • 7. Who owns the consumption budget? Usage-based pricing has no natural ceiling. Without a named owner reviewing spend monthly, finance discovers the number at quarter end.

Questions one and six are the load-bearing ones. The other five are important; those two determine whether the rest are recoverable.

If swapping a model is not a configuration change, the integration is unfinished.

What the failure data actually shows

MIT's NANDA initiative published the most-cited enterprise AI study of the cycle in 2025 — The GenAI Divide: State of AI in Business 2025 — built on 300 public deployments and 150+ executive interviews. Its headline finding was that roughly 95% of enterprise GenAI pilots delivered no measurable P&L impact, and that the divide was organisational rather than technological.

Gartner's projection points the same way from a different angle: it expects over 40% of agentic AI projects to be cancelled by the end of 2027, citing escalating costs, unclear business value and inadequate risk controls. Read together, the anatomy is consistent — single-vendor SDKs wired into production code, no privacy boundary, no baselines, and no named owner for spend.

95%Enterprise GenAI pilots with no measurable P&L impact (MIT NANDA, 2025)
>40%Agentic AI projects Gartner expects to be cancelled by end-2027
~1 weekTypical cost of building the abstraction that prevents most of this

What the routing layer actually is

It is less exotic than it sounds. A thin interface your application calls — 'summarise this', 'classify that' — behind which a router decides which provider and model serves the request, based on the data's classification, the quality the task needs, and cost.

Two consequences follow immediately. The privacy question stops being a debate and becomes routing policy: regulated classes pin to a model inside your boundary, everything else goes to whichever frontier model is best value this quarter. And the vendor question stops being architecture: when the market reshuffles — and it reshuffles roughly quarterly — you change a config value.

We build this way on our own products, which is the only reason we are confident recommending it. Our site chatbot is provider-agnostic; moving it between Gemini, Anthropic and an OpenAI-compatible endpoint is an environment variable, not a project.

The sequencing mistake almost everyone makes

The instinct is to prove value first and worry about architecture later. It is a reasonable instinct and it is why so many pilots become stranded assets. The pilot works, leadership funds production, and the team discovers that the thing they built cannot be moved, cannot pass a compliance review, and has no cost ceiling.

The alternative costs about a week: build the abstraction and the data classification before the first workflow, then run the pilot behind it. The pilot is no slower. The difference is that if it succeeds you can ship it, and if it fails you have lost a pilot rather than a quarter.

A decision rule you can steal

If you take one operating rule from this, take this one:

  • Classify data before choosing a model — the classification decides the architecture
  • Never let application code import a provider SDK directly; call your own interface
  • Confirm the training terms of the tier you are actually on, in writing
  • Baseline the workflow numerically before the pilot, or you cannot prove anything afterwards
  • Name one person accountable for consumption spend, with a monthly review in the calendar
  • Re-evaluate the model market quarterly; treat a provider swap as routine maintenance

Where we would tell you not to hire us

If you are running one internal workflow with non-sensitive data and no compliance surface, the routing layer is over-engineering. Call the provider directly, keep the code in one file, and revisit when a second workflow appears.

The abstraction earns its week when you have more than one workflow, any regulated data, or an enterprise customer who will eventually send a security questionnaire. Below that threshold we would tell you to spend the week on the product instead.

Frequently asked

Marginally at the start, substantially less later. The abstraction is roughly a week of work up front and saves a rewrite when — not if — you change providers. Teams that skip it typically pay that week back several times over in the first migration.

For a large share of production tasks, yes. Classification, extraction, summarisation and routing are well served by smaller open-weight models at a fraction of frontier cost, and they run inside your boundary. Frontier models earn their price on open-ended reasoning.

One test: could an engineer point a workflow at a different provider tomorrow by changing configuration? If it requires touching application logic in more than one place, you have architectural lock-in regardless of what the contract says.

Check the terms first. Free tiers of the major providers generally use submitted content to improve their products. That is often acceptable for a pilot on synthetic data and rarely acceptable for one on customer data — and pilots have a habit of quietly becoming production.

CE
Corelynx Editorial · Corelynx · info@corelynx.com
Keep reading
Salesforce & Agentforce August 28, 2026 10 min read

Salesforce Optimisation vs Replatforming: How to Tell Which You Need

Most mid-market companies are not buying their first CRM. They are deciding whether to fix the one they have or leave it.

Read the article
Salesforce & Agentforce August 24, 2026 13 min read

Agentforce Readiness: Six Evidence Tests, and What Failing Each One Costs

The demo is always impressive. What determines whether it survives production is six things, and none of them are the agent.

Read the article
AI Architecture August 21, 2026 9 min read

Most AI Pilots Fail Before the Model Is Chosen

An argument against buying AI tooling, from a firm that sells AI transformation.

Read the article
Technical Leadership August 14, 2026 8 min read

Why We Tell Some Founders They Don't Need a Fractional CTO

A meaningful share of founders who ask us for a fractional CTO do not need one. Telling them costs us a deal and buys something worth more.

Read the article
Technical Leadership August 10, 2026 12 min read

The 12 Decisions a Founder Shouldn't Make Without Technical Leadership

Most technical debt is not written in code. It is decided in a meeting, by someone without the context to know what they are choosing.

Read the article
Build vs Buy August 7, 2026 10 min read

Rebuilding a Bespoke CRM as the System of Revenue Truth: What We'd Do Differently

Publishing your own second-guessing is rare in consulting. It is also the only way a case study tells you anything useful.

Read the article
Build vs Buy August 3, 2026 11 min read

What a Production-Grade MVP Actually Includes

Two quotes for the same MVP, $20,000 apart. The gap is almost never features — it is the eight things that do not demo.

Read the article
Adoption & Change July 29, 2026 9 min read

Your CRM Will Not Fail on Technology. It Will Fail on Adoption.

The post-mortem on a failed CRM almost never blames the software, and almost always blames "adoption". But adoption is an outcome, not a cause. Here is what produces it.

Read the article
CRM Strategy July 22, 2026 12 min read

How to Develop a CRM Strategy Before You Buy Anything

Most CRM strategies are written after the platform is chosen, which makes them implementation plans wearing a strategy label. Here are the four decisions that have to come first — and the order they go in.

Read the article
Revenue Operations July 15, 2026 11 min read

Is Your CRM Delivering? Six Tests It Should Pass

Most CRM reviews measure adoption — logins, records created, fields filled. Those tell you the system is being used, not that it is working. Here are six tests that measure whether it earns its cost.

Read the article
Build vs Buy July 8, 2026 10 min read

Why an Off-the-Shelf CRM Is Not Enough for Your Company

Packaged CRM is the right answer more often than custom-software firms like to admit — and the wrong answer more often than buyers realise. Here is the decision framework, including the cases where you should not build.

Read the article
Field Operations June 30, 2026 9 min read

Mobile CRM: What Field Teams Actually Need From It

Every CRM has a mobile app and most field teams do not use it. The reason is a design decision, not a technology limit — mobile gets treated as a smaller desktop rather than a different job.

Read the article
Revenue Operations June 24, 2026 16 min read

What Is Revenue Intelligence? The 2026 Executive Guide

Vendors use the term for everything from call recording to dashboards. Underneath the noise is a real discipline — here's the plain-language version, with a maturity model and a starting sequence.

Read the article
AI Architecture June 18, 2026 17 min read

Public vs. Private LLMs: An AI Architecture That Protects Your Data

You don't have to choose between AI capability and data privacy — and you definitely don't have to marry one vendor. The architecture that solves both, explained in plain language.

Read the article
Salesforce & Agentforce June 10, 2026 14 min read

Salesforce Agentforce Implementation Cost in 2026: A Transparent Breakdown

Agentforce ARR is growing 205% year over year, and every Salesforce AE has quota pressure to sell it. Here's what implementation actually costs — and the readiness question to answer before spending anything.

Read the article

Talk this through with a practitioner.

The first conversation is about context and fit — nothing more.

Book a Strategy Session

Keep exploring.

See everything under Blog.

Browse Blog
Book a Strategy Session