CustomLabs
Case studies

Cutting Inference Spend 40% Without Betting on One Vendor

-41% Cost per resolved request Blended, first full month post-cutover vs. trailing 30-day baseline
-28% p95 latency Cheapest eval-passing model per request class
3 wks Residency-workload migration Zero product-code changes, zero downtime

The client is anonymised, and these figures are not independently audited.

At a glance#

Flow diagram. Calls enter one internal interface. A router sends each request class to the cheapest model that clears its eval bar, with a provider fallback chain behind it. A log of model, latency and cost feeds a weekly dashboard. CALLS ROUTER MODELS LOGGING One internal interface Router by request class Cheapest model above the eval bar Provider fallback chain Log of model, latency, cost Weekly dashboard on failure
The routing layer. Every call uses one interface. The router picks a model for each request class.
We ruled out
  1. Staying with one vendor and negotiating on price
  2. Self-hosting open-weight models
Reference shape

Model-agnostic inference gateway

The problem

A Series B fintech ran fraud-risk scoring and case-note summarization on a single LLM provider. Its spend curve was growing faster than its revenue curve. Every new risk model added cost. So did every new customer segment and every new use case. All of it landed on the same provider’s bill. The finance team asked the questions that stop any all-in vendor bet. What if this provider raises prices? What if it degrades service, or goes down during a fraud spike?

The concentration risk had already caused harm. The provider had already raised prices in the middle of the contract. A multi-hour outage six months earlier forced the fraud team to fall back to a slower, rules-only model for half a business day. During that time, a measurable share of fraudulent transactions cleared. The company had also signed a European enterprise customer. Its contract required some risk-scoring workloads to run on infrastructure located in the EU. The incumbent provider had no committed in-region deployment on the fintech’s timeline. The team had three bad choices. It could pay whatever the vendor asked. It could absorb outages as a cost of doing business. Or it could turn down or delay a signed deal.

What we ruled out, and what we built

Two paths looked easy, and both were wrong for a Series B company. The first was to stay with one vendor and negotiate harder on price. That does nothing about concentration risk. A startup has little leverage against a provider that its mission-critical workload depends on. The second was to self-host open-weight models and escape provider pricing entirely. That is technically sound. But it swaps a vendor dependency for a GPU fleet and an MLOps burden. The company had no reason to carry that burden, and fraud-risk scoring was a poor use of its infrastructure headcount.

We designed a model-agnostic routing layer. Every product surface calls one internal interface. The routing logic decides which model handles each request, and the calling code does not. Requests fall into classes, such as fraud scoring, case-note summarization and customer-facing explanation text. Each class has its own evaluation suite, built from labeled historical cases with known-correct outcomes. For each class, the router sends traffic to the cheapest model that clears that class’s eval bar. A model that is cheap and wrong on fraud scoring is not cheap, so the router never picks the cheapest model overall.

Under the router sits a provider fallback chain. If the primary model is degraded or down, traffic fails over automatically to a secondary model. That secondary model has already passed the same eval gate. The system no longer falls back to a slower rules engine by hand.

The EU residency requirement became a proof point for the architecture. It did not need a separate project. Every call already went through the router’s interface, and none used a hardcoded SDK call to one provider. So standing up an in-region model for the residency-bound workload class took one routing-config change. The team pointed that request class at the new provider. They ran it against the existing eval suiteAn eval suite is a versioned set of test cases that measures whether outputs are good. to confirm it cleared the bar. Then they cut over. No product code touched a provider SDK directly, so the application layer needed no rewrite.

We also put cost and quality into one feedback loop. The router logs which model handled each request. It also logs the latency, the cost and the eval-suite pass or fail status for that request. That data feeds a dashboard that the engineering team checks weekly. When a provider ships a cheaper model that clears the eval bar for a class, the router picks it up automatically. Cost drops, and nobody has to touch the fraud-scoring logic.

The outcome

Blended cost per resolved request fell 41% in the first full month after cutover. The comparison point is the trailing 30-day baseline on the single-vendor setup. The router settled on cheaper, eval-passing models for the request classes that did not need the most expensive option. p95 latency dropped 28% over the same window. Several request classes moved to smaller, faster models that still cleared their eval bar. The most expensive model was rarely the fastest one either. The EU residency migration took three weeks end to end, with zero downtime and zero changes to product code. The router config change was the whole migration.

For the CFO, the cost curve finally separates from usage growth. The routing layer’s build cost pays back inside a single quarter against the ongoing savings. A payback that short gets infrastructure work approved without a fight.

For IT and security, the router gave them one audited egress point. It also gave them one place to manage provider credentials, in place of scattered SDK calls. It closed the compliance gap that had blocked the EU deal and opened no new one. There is no lock-in, and no single point of failure holds a regulatory requirement hostage.

For the operations team that runs fraud detection, the fallback chain turns a single-provider outage into a routine failover. That kind of outage forced a costly manual fallback during the earlier incident. Now it does not reach a pager. The eval gate also means a cheaper model can never ship a quality regression into fraud scoring without anyone noticing. Nothing routes to a request class until it clears that class’s bar. Cost and score quality move together.

The team now treats every new model release from every provider as a candidate. Each one gets tested against the eval suites. If it clears the bar and is cheaper or faster, the router starts using it. If it does not, nothing changes. This is the leverage the VP of Engineering meant. The fintech no longer negotiates with one provider from a position of dependency. Switching providers is a config change.

“We stopped negotiating from weakness. Switching providers is now a config change, not a project.”

VP of Engineering
Related services
Strategy & ArchitectureAI Integrations
Switching providers should take a config change.

A Ship Audit checks whether your model calls sit behind a router today. That router is what let this team move a workload without touching product code.

Written by

CustomLabs Engineering

Agentic AI engineering team

CustomLabs is a small, senior-only studio that embeds with client teams. It ships eval-tested, model-agnostic AI systems into production in weeks. Every insight reflects work and lessons from the studio's own engagements — the people who write the code write the words.

Source: https://customlabs.io/case-studies/model-agnostic-routing-cut-inference-spend/

↑↓ navigate ↵ select esc close