Direct model access creates inference sprawl; a control plane restores policy, reliability, and cost discipline.
01 THE PROBLEM
LLM inference sprawl is the failure mode where application teams call model providers directly, each with their own prompts, keys, fallback logic, logging, and guardrails.
It starts innocently.
A product team adds GPT-4o for support summarization. Another ships Claude for long-context analysis. A third uses Gemini for classification because it was cheaper in a quick benchmark. An internal tools team wires in open-weight models through vLLM for privacy-sensitive workflows. Within one or two quarters, you no longer have “AI features.” You have a distributed inference estate with no shared policy surface.
The consequence is not conceptual. It shows up in production fast.
Within 30 to 90 days, you typically see five concrete failures:
- No consistent routing policy
- No trustworthy cost picture
- Broken observability
- Inconsistent security and governance
- Provider outages become product outages
The gap is simple: most teams have added LLMs as vendor APIs, not as a shared production platform.
That was tolerable when one engineer was experimenting with one provider. It breaks when AI moves into customer-facing paths, revenue workflows, or internal operations with hard expectations around latency, privacy, and spend.
An AI gateway control plane is the missing layer between applications and models.
It is not just a proxy. It is the place where routing, authentication, authorization, guardrails, logging, caching, cost controls, fallback policy, and evaluation policy live. Databricks describes an AI gateway as the layer that “governs the traffic between callers and models,” including auth, permissions, rate limits, guardrails, payload logging, usage tracking, and routing. That definition is operationally correct.
If your application code knows the provider name, the exact model SKU, the fallback order, the prompt formatting quirks, and the retry behavior, your architecture is already off track.
You have coupled product code to an unstable supplier market.
That coupling gets expensive faster than most teams expect. Model quality shifts monthly. Pricing changes. New context windows reset capability assumptions. Safety filters behave differently by provider. Throughput limits appear at the worst moment. If every adaptation requires application changes across multiple teams, your AI roadmap slows to the speed of coordination.
This is why the control plane matters.
Not because AI is special in some mystical way. Because inference has become infrastructure, and infrastructure without a control plane turns into sprawl.
Accelerate AI Delivery with Nearshore Teams02 WHY IT HAPPENS
The root cause is architectural convenience combined with organizational incentives.
The easiest way to ship an AI feature is to let each team integrate directly with the model that worked in their prototype. That decision optimizes for local speed. It pushes global complexity into the future.
Every engineering org knows this pattern from before AI.
Teams once embedded payment logic directly into product services before companies like Stripe normalized abstraction around payment orchestration. They embedded cloud credentials in ad hoc deployment scripts before platform teams standardized identity and policy. They hardcoded feature flags before control planes made rollout policy central.
LLM inference is following the same arc.
The structural reason is that model interfaces look deceptively uniform. Most providers expose an HTTP API that accepts messages and returns text. This creates the illusion that a provider switch is trivial. In practice, the hard part is not sending the request. The hard part is everything around the request:
- which model is allowed for which data class
- acceptable latency by user journey
- fallback behavior under provider degradation
- prompt versioning
- safety policy
- caching policy
- budget enforcement
- traceability for audits and incident review
- evaluation after model changes
When this logic lives inside each app, every team rebuilds a partial control plane badly.
The incentive misalignment makes it worse.
A product team is measured on shipping and adoption. They are not measured on maintaining a provider-agnostic inference layer for the company. A staff engineer can see the mess coming, but if there is no explicit platform mandate, direct integration wins because it is one sprint faster.
This is the same systems dynamic Nicole Forsgren, Jez Humble, and Gene Kim describe in Accelerate: local optimization often damages flow at the system level. You can move faster for one team this month while making the whole delivery system slower next quarter.
Inference also changes faster than adjacent infrastructure.
A PostgreSQL version upgrade is a planned event. A model market shift is constant. OpenAI changes API behavior. Anthropic releases a better long-context model. Google cuts prices. An open-weight model becomes good enough for a class of internal tasks when run behind vLLM. If your application tier owns these decisions, every market change becomes a product engineering problem.
That is not where those decisions belong.
There is also a data-plane versus control-plane confusion.
The data plane is serving requests with low latency and high availability. The control plane decides policy: who can call what, under which constraints, with which fallback order, at what budget, and with what observability.
Most teams build the data plane first because the first thing they need is “make this request work.” They delay the control plane until the pain is obvious. By then, ten services depend on direct provider APIs and unwinding the coupling becomes politically and technically expensive.
Cloudflare’s broader architecture writing has repeatedly reinforced the value of separating traffic handling from policy enforcement in networked systems. The same principle applies here. LLM inference has become another traffic class that needs a policy layer.
One more reason this happens: teams underestimate heterogeneity.
They assume “LLM inference” is one workload. It is not.
A chatbot, a coding assistant, document extraction, ranking, moderation, summarization, SQL generation, and agentic tool use are different workloads with different failure tolerances. The cheapest acceptable model for one path will be unacceptable for another. The observability and rollback needs differ too.
Without a control plane, that heterogeneity leaks into every service.
With a control plane, the application says what it needs in product terms — for example, “support_answer_v3, under 2.5 seconds p95, PII-safe, budget tier standard” — and the platform decides how to fulfill it.
That is the architectural inversion mature teams eventually arrive at.
03 WHAT MOST GET WRONG
The most common misdiagnosis is thinking this is primarily a vendor problem.
It is not.
Teams say, “We just need to pick the best model provider,” or “We’ll standardize on one vendor for now.” That sounds efficient. It usually fails within six months.
Why it fails:
- No single provider dominates every workload. The best model for long-context reasoning may not be the best for low-latency classification.
- Commercial terms change. The provider that looked cheap in Q1 may not be cheapest in Q3.
- Reliability is uneven. Outages, rate limiting, and regional capacity constraints happen.
- Compliance needs diverge. Some data cannot leave your boundary. Some can.
- Product expectations evolve. A prototype-grade response is acceptable in beta, not in enterprise rollout.
The second mistake is building “a thin proxy” and calling it a gateway.
A thin proxy hides API keys and maybe normalizes request formats. That is useful, but it is not a control plane.
If the proxy does not own routing policy, access control, cost attribution, observability, caching, prompt registry, and failover rules, application teams still carry the operational burden. You have added a hop without removing complexity.
The third mistake is over-indexing on prompt management and ignoring serving policy.
Prompt tooling matters. But many teams spend weeks debating prompt versioning and eval harnesses while requests still bypass any centralized budget limits or redaction policy. That is upside-down. If you do not know who is calling which model with what data and what it costs, prompt optimization is not your first problem.
The fourth mistake is treating AI gateway adoption as a future “platform maturity” project.
That delay is costly because direct model calls spread through the codebase quickly. Every shipped feature creates migration work. The longer you wait, the more integration points you own.
The software industry has seen this movie before.
In “Move Fast with Stable Infra,” Stripe Engineering described the value of creating strong abstractions so product teams can move without each team rediscovering infrastructure complexity. The lesson applies directly here: if you do not build the abstraction early, each product team creates its own unstable one.
There is also a specific failure mode around incident response.
When a provider degrades, teams without a control plane often scramble manually:
- edit environment variables
- redeploy services
- disable features behind flags
- loosen timeouts
- switch prompts because another model formats output differently
That is not failover. That is an outage choreography.
API7’s framing of an AI agent control plane is directionally right here: requests should flow through a gateway that can route based on cost, latency, capability, or availability. If Claude is down, the system should fail over according to policy. The key point is not the specific providers. It is that this decision should not require changing client code.
The fifth mistake is assuming existing API gateways are enough out of the box.
Traditional API gateways solve authentication, throttling, and routing. They do not solve LLM-specific needs by default:
- semantic caching
- prompt/template versioning
- token accounting
- model-level quality routing
- safety scanning on prompts and outputs
- structured output validation
- eval-triggered rollout gates
- provider normalization around context limits and streaming behavior
You can extend a standard API gateway. Some teams should. But saying “we already have Kong/NGINX/Envoy, so we’re done” is usually false.
One useful parallel comes from Netflix’s engineering culture around resilient systems: reliability is not a property you add with a single component. It emerges from explicit handling of failures, dependencies, and fallback behavior. The same applies to inference. A gateway without policy, telemetry, and fallback design is just a new dependency.
What does this cost when teams get it wrong?
Three things:
- Feature velocity drops
- Reliability incidents multiply
- Spend drifts upward without accountability
That last one matters more than teams admit. LLM spend is often small relative to payroll until it suddenly is not. The dangerous phase is when it is large enough to hurt but still too opaque to manage.
04 THE FRAMEWORK
The control plane that works is boring in the best sense: one entry point, clear policy, measurable outcomes, and minimal provider logic in product code.
You do not need a grand AI platform to start. You need a narrow, hard boundary.
1. Put a single inference endpoint between apps and models
The first rule is architectural: product services never call model vendors directly.
They call one internal endpoint or SDK owned by the platform boundary. The client request should specify the workload intent, not the provider implementation. Examples:
- `task=support_summary_v2`
- `task=contract_risk_extract_v1`
- `task=search_rerank_low_latency`
- `task=agent_tool_planner_high_reasoning`
This is the same kind of interface discipline Stripe uses in payments abstractions: product code should express business intent, while the platform layer hides the downstream rails.
What this buys you:
- provider swaps without app redeploys
- centralized auth and key management
- unified telemetry
- one place to add policy
Tradeoff:
- you introduce a critical dependency
- if the gateway is unreliable, everything is unreliable
So treat it like production infrastructure from day one: horizontal scaling, timeout budgets, circuit breakers, and explicit SLOs.
A reasonable starting SLO for the gateway itself is 99.9% monthly availability for the control path if it fronts customer-facing AI features. That allows roughly 43 minutes of downtime per month. If the AI path is core revenue infrastructure, aim higher. The Google SRE book’s guidance is clear: SLOs should reflect user impact, not aspirational perfection.
2. Define workload classes before model policy
Most teams choose models first and classify workloads later. Reverse that.
Create 4 to 6 workload classes with explicit constraints. For example:
- Real-time UX
- Background enrichment
- High-trust generation
- Sensitive-data inference
- Agent planning
This sounds administrative. It is not. It is how you stop every team from inventing its own risk model.
Databricks’ AI gateway framing is useful here because it treats governance as traffic policy, not documentation. That is the right mental model.
Tradeoff:
- this adds process early
- but it prevents a more painful retrofit later when enterprise customers ask where their data goes and why one path can use public APIs while another cannot
3. Route by policy, not by provider preference
Once workloads are classified, map each class to routing policy.
That policy should include:
- primary model
- fallback models
- timeout budget
- max token budget
- output format requirements
- region or deployment constraints
- redaction policy
- cache eligibility
- logging retention
This is where most cost savings and reliability gains come from.
A common mature pattern is tiered model routing:
- use a smaller, cheaper model for classification, extraction, and straightforward transforms
- escalate only when confidence is low, latency is acceptable, or the task explicitly requires stronger reasoning
Do not market this internally as “smart AI orchestration.” Call it what it is: a cost and reliability policy.
A practical benchmark:
- if more than 20% of requests in a high-volume workflow are hitting your premium model by default, pause and review whether routing is too permissive
- if your fallback model activation rate exceeds 2–5% for seven days, you likely have a provider reliability issue or a bad timeout threshold and should revisit routing policy
Those are practitioner thresholds, not industry standards. But they are useful because they force teams to instrument the right behavior.
Cloudflare’s work on traffic steering and edge policy illustrates the bigger point: once traffic classes exist, routing becomes a strategic lever. In inference, that lever controls both quality and gross margin.
4. Instrument unit economics at the workflow level
If you cannot answer “what does one successful support resolution cost in tokens and dollars,” your AI platform is not managed.
Track at least:
- cost per request
- cost per successful outcome
- tokens in / tokens out
- cache hit rate
- retries per request
- fallback rate
- latency p50/p95 by workload
- structured output failure rate
- safety intervention rate
Do not stop at provider-level billing dashboards. They tell you where money was spent, not whether it was spent well.
PostHog has consistently pushed product teams toward tying technical events to product outcomes. Apply the same discipline here. AI cost is only meaningful relative to workflow value.
A good operating review includes a table like this:
| Workflow | Requests/day | p95 latency | Success rate | Avg cost/request | Premium model share | Cache hit rate |
|---|---|---|---|---|---|---|
| Support summary | 120k | 1.8s | 99.2% | $0.003 | 8% | 34% |
| Contract extract | 9k | 11.2s | 96.5% | $0.041 | 42% | 3% |
| Search rerank | 400k | 450ms | 99.8% | $0.0006 | 0% | 71% |
Tradeoff:
- collecting prompt and response traces can create privacy and retention risk
- solve this with selective logging, redaction, and environment-level retention controls, not by turning observability off
5. Make evals a deployment gate, not a side project
Changing a model is a production change.
Treat it like one.
When routing policy changes, or when a provider silently updates behavior, you need evals that test:
- quality on representative datasets
- latency deltas
- structured output compliance
- refusal and safety behavior
- regression against known edge cases
This is where teams often borrow from software deployment practice but fail to complete the loop.
Vercel’s platform writing repeatedly emphasizes shortening the path from change to feedback. For LLM systems, that means evals tied to routing and prompt version changes, not a notebook someone ran three weeks ago.
Use a layered eval approach:
- offline eval set for known examples
- canary traffic on a small percentage of production requests
- side-by-side shadow testing for alternatives
- rollback if error budget or quality threshold is breached
One useful benchmark from classic reliability practice: if a model change causes a breach of your customer-facing latency SLO or raises structured-output failure rates above an agreed threshold — for example above 1% on workflows that require machine-readable output — it should auto-fail promotion.
That 1% is not a universal law. It is a sensible starting point for workflows where downstream automation depends on schema correctness.
6. Add guardrails where they matter, not everywhere equally
Guardrails are often discussed vaguely. Make them concrete.
There are four practical layers:
- Input controls
- Execution controls
- Output controls
- Audit controls
OWASP’s Top 10 for LLM Applications is useful here because it names the categories teams routinely underestimate, especially prompt injection and sensitive information disclosure. These are not academic issues if your model can call tools or retrieve internal data.
Tradeoff:
- every guardrail adds latency and complexity
- but the right answer is selective application, not avoidance
- your customer-facing creative assistant does not need the same controls as a procurement agent with ERP access
7. Use caching aggressively, but only where semantics are stable
Caching is one of the highest-leverage techniques in inference systems. It is also one of the easiest to misuse.
Use caching for:
- repeated system prompts and templates
- retrieval results with stable inputs
- deterministic transforms
- common summarization tasks on unchanged source material
- repeated classification of identical or near-identical content
Do not use naive caching for:
- highly personalized outputs
- low-repeat freeform generation
- stateful multi-turn contexts without careful normalization
A gateway control plane is the right place to apply caching because it sees traffic patterns across applications.
GitHub’s engineering culture around centralized developer platform capabilities is relevant here: when one layer serves many teams, optimizations compound. Semantic caching in a gateway can save money across the entire estate; per-service caching cannot.
Watch one metric closely: cache hit rate by workflow. Anything below 10% on a workflow you believed was repetitive means your normalization strategy is probably poor, or the workload is not actually cache-friendly.
8. Normalize provider differences behind a stable contract
Providers differ in:
- tokenization
- context limits
- streaming formats
- tool calling schemas
- safety filter behavior
- retry semantics
- timeout envelopes
Do not pretend these differences do not exist. Encapsulate them.
A useful pattern is a canonical internal response object that includes:
- text or structured output
- safety flags
- latency metadata
- token/cost metadata
- route taken
- confidence or quality annotation if available
- retry/fallback history
This matters because downstream consumers need consistent handling.
Figma’s engineering style has often emphasized sharp interface boundaries that keep product code clean while underlying systems evolve. Your LLM control plane needs that same discipline. Product engineers should not need to know which provider encodes tool calls differently this month.
Tradeoff:
- normalization can hide useful provider-specific features
- the answer is to support an “escape hatch” for advanced use cases, but make it explicit and reviewable
If more than 10–15% of requests need provider-specific overrides, your abstraction is either too thin or your workloads are too heterogeneous for one common path. At that point, create multiple policy classes, not bespoke chaos.
9. Put ownership with a small platform group, not a committee
This layer needs a directly responsible team.
Not a steering group. Not “architecture” as part-time oversight. Not every product team owning its own slice.
A small platform team — often 2 to 5 engineers at Series B/C scale — can own:
- gateway runtime
- policy registry
- eval integration
- observability
- provider onboarding
- reliability and incident management
Will Larson’s work on staff engineering repeatedly points to the importance of clear ownership boundaries for cross-cutting systems. This is one of those systems.
Tradeoff:
- central ownership can become a bottleneck if the team insists on approving every model use manually
- avoid this by making policy self-service within guardrails: product teams choose workload classes and prompt versions; the platform owns the rails
10. Decide early what you build vs buy
You have three realistic options:
- Extend your existing API gateway/service mesh
- Adopt a specialized AI gateway
- Build a thin internal control plane around open components
Mozilla AI’s framing around Otari is useful because it places model choice, agent governance, and cost control in one system. Whether you use Otari or something else, that bundling is directionally right.
The decision turns on three factors:
- how differentiated your inference policy needs are
- whether regulated or private workloads require custom deployment paths
- whether your team can support another tier-0 service
A practical rule:
- if AI requests are under 100k/day, one or two providers, and mostly internal, buying or lightly extending existing infra is usually enough
- if you are crossing 1M requests/day, serving customer-facing AI, or mixing hosted and self-hosted models, a dedicated control plane becomes hard to avoid
That is not a universal threshold. It is the point where hidden complexity usually surfaces in painful ways.
05 STRATEGIC TAKEAWAY
An AI gateway control plane is not optional once inference touches core product paths. It is the boundary that lets a CTO change model policy, manage cost, and contain failures without coordinating redeploys across half the company. If you put this layer in place now, you turn model volatility into a platform concern instead of a product tax. If you do not, the next provider outage, enterprise security review, or surprise monthly bill will force the same decision under worse conditions — usually in the quarter when you can least afford the distraction.
06 IMPLEMENTATION ANGLE
Start narrower than you want.
Pick one customer-facing workflow and one internal workflow. Put both behind a single gateway endpoint. Add three things first: centralized auth, request/response telemetry with cost attribution, and policy-based routing with at least one fallback path. That gives you immediate leverage without waiting for a full “AI platform” program.
In the first 30 days, define your workload classes, publish a canonical request/response contract, and remove direct provider keys from application services. In the next 60 days, add schema validation, budget caps by team or feature, and a basic eval gate for model changes. By 90 days, you should be able to answer four operational questions quickly: which workflows cost the most, which routes breach latency SLOs, which provider issues caused fallbacks, and which prompts or model changes regressed output quality.
If your engineering org is scaling quickly, this is one of the places where platform capability compounds. A small team can save every product squad from solving the same reliability and governance problems badly. Amplify can help engineering teams scale the people side of that transition, especially when you need senior platform and infra talent without slowing delivery. But the operating model has to come first: one boundary, one owner, clear policy, and measurable outcomes.



