The Hidden Cost of Smart Routing

Dr. Taoufik Elkabir November 24, 2026
The Hidden Cost of Smart Routing

Smart routing saves money by sending easy requests to cheaper models and keeping the expensive ones for hard requests. Someone has to decide which is which, though, and that decision is another model call. If that model re-reads the whole conversation from the start on every turn, the cost of deciding can eat the savings, or even exceed them.

We looked at that cost. We got the Vela decision model running on vLLM so it can reuse work it has already done on a conversation. Our integration serves Vela’s existing routing, prompt-injection detection and personal-data extraction capabilities on one shared backbone, without a separate routing decision service.

Two results to keep in mind. In a conversation test, median latency for the full decision pipeline dropped 18%. When we ran extraction repeatedly on the same ~16K-token document, a warm cache cut median latency by 72%, from 4.24 s to 1.19 s. They come from different tests, so don't add them up.

Where the extra cost comes from

Before the answering model sees a request, another model looks at it first. It decides whether the request is easy or hard, whether it contains a prompt-injection attempt, and whether it contains

personal data.  The application applies these evaluations through routing and protection policies. We call this the decision layer.

The native Vela implementation we tested runs on a Transformers-based runtime. In the decision and extraction paths we tried, it had no prefix reuse between calls. Prefix reuse means reusing valid cached computation for an unchanged prefix instead of processing it again. That text remains available as context. Without it, the same instructions and earlier messages get processed again on every call. The longer the conversation, the more this repeated work costs.

A cache hit in the answering model doesn't help here, because each model keeps its own state. The decision layer needs its own reuse. That's what we set out to build.

One Vela model for three jobs

We use Vela3-Flash, a 9B-class model from vLLM Semantic Router and KR Labs, referred to here as Vela, as the sole decision model for three things:

1. Easy/hard routing classification
2. Prompt-injection detection
3. Personal-data extraction

Routing no longer needs a separate D3-Flash decision service. The three jobs share one backbone, using decision readouts and specialized extraction adapters and heads, with separate evaluations. They don't run as a single combined forward pass.

We moved Vela onto vLLM without retraining its weights. That gives us one place to handle reuse, memory and validation. Most of the work was runtime engineering, getting the cache logic right, and checking quality.

Why reuse isn't just a cache setting

You can only reuse earlier work if the model's math allows it.  Vela combines attention and recurrent layers. Within a bidirectional block, later text can change how earlier tokens are represented. If someone edits a block, the saved state for the start of that block can be wrong, and reusing it would quietly give wrong results. A cache flag can't catch that, so routing/injection and extraction each get their own approach:

- Routing and injection detection Personal-data extraction
How input is organized Instructions and messages arranged into semantic blocks Original document-window arrangement kept
What is reused Completed, unchanged blocks Identical completed windows, plus bounded auxiliary hidden states the extraction head needs
What happens on an edit Affected state is invalidated A changed window cannot inherit an arbitrary prefix from its earlier version
What stays the same Model weights remain unchanged. Input arrangement and attention pattern are adapted and independently evaluated. Attention behavior, span heads and decoding are unchanged

Two more details:

•      For routing and injection,  we aligned the attention cache and saved recurrent state - the numerical state carried forward - at the same valid stopping point. That lets reuse start during a normal conversation, with no artificial preload request.

•    For extraction, the head still runs on every call. We reuse computation, not final answers.

As an example of what extraction does: an identity-focused policy can mask "Alice Example" and keep "asthma" as useful context. The application handles restoring names and authorizing exports. Masking identities alone doesn't make data anonymous.

FLA: making the remaining work faster

Reuse skips repeated work. A separate study made the work that's left faster. We adapted how Flash Linear Attention (FLA) kernels plug into Vela's Gated DeltaNet computation and looked at precision and memory tradeoffs, again without changing model weights.

With one concurrent request and contexts of 2K-12K tokens,  the selected path in the native runtime achieved 23–27% higher input-processing throughput than the tested native reference. In follow-up testing, 464 paired cases got the same predicted classes, though confidence scores could differ. [5]

We measured FLA in the native runtime on a different accelerator platform from the Hopper-generation GPUs used for vLLM prefix reuse, so you can't add their gains. We adapted and validated existing FLA kernels; the kernels themselves are their authors' work.

Results

The vLLM tests below ran on Hopper-generation GPUs in BF16. There are two sets of results. The workloads and policies differ, and each compares different things, so they shouldn't be merged into one speedup.

In the earlier conversation test, the combined injection, routing and identity-extraction pipeline moved from a median of 298 ms to 244 ms relative to native Vela. The workload comprised ten conversation turns replayed three times, with warmup treated separately. [1]

The packaged-runtime test used ten fictional cases, three repetitions and three modes: native Vela, vLLM with a cold cache and vLLM with a warm cache. It completed 90 measured calls, excluding 20 warmups. For a repeated document targeting 16,384 tokens, median extraction latency on the same vLLM runtime fell from 4.24 seconds to 1.19 seconds. [2]

Repeated ~16K-token identity extraction

Warm calls reused 97.8% of rendered input tokens, including schema and overlapping-window tokens. Distinct numbered paragraphs prevented artificial hits from identical windows during the first pass; all measured cold calls reported zero cached tokens. Long-document processing used extraction windows, not one 16K bidirectional extraction pass. [2]

The ten-case packaging suite showed no native/cold/warm class or span disagreement, with all annotated identities covered and useful context preserved. The package passed 24 CPU tests. These results establish scope-specific latency and quality behavior; they do not measure an equivalent percentage reduction in total serving cost. [2]

The bigger picture

The Vela work is one example  of how we treat inference: as a whole service, not one model at a time. Our method doesn't depend on any particular model provider, cloud operator or hardware vendor. We start from the workload, the quality requirements and the service objectives, then adapt and validate the setup for each environment, so organizations keep their infrastructure choices. Cache reuse is one piece. Overall performance depends on how everything works together.

We judge the combined result by throughput, time to first token (TTFT), generation speed and service-level objective (SLO) compliance, including waiting time. Two results from separate studies:

•      64-user conversation benchmark [3]: output throughput went up 3.4 times, from 390 to 1,320 tokens per second. For returning turns, p95 TTFT fell from 4.4 to 0.9 seconds, SLO compliance rose from 97% to 100%, and input-token cache reuse reached 92.9%. These are results for the whole system, not for any single technique.

•      32K-context, 64-request experiment [4]: more than 10 times the output throughput when context could be reused. p95 TTFT fell from 149 to 5.4 seconds, and at least 95% of requests got a first token within 10 seconds and then generated at 5 tokens per second or faster. The test compares cold and preloaded prefixes on the same configuration, with the preload itself excluded. It does not compare our full method with an engine that is equally warm.

Results depend on the workload and the baseline, and gains from separate studies don't add up. We share selected contributions and measurements and keep our internal know-how. What we're after is more usable AI capacity, predictable response times, and freedom to choose your infrastructure.

Glossary and evidence

Term

Plain meaning

Smart routing

Choosing a model suited to each request's difficulty so easy requests cost less

Decision layer

Model evaluations and application policies for routing, injection checks and personal-data handling before answering

Vela

Vela3-Flash, the 9B-class decision model used here, from vLLM Semantic Router and KR Labs

vLLM

An open-source engine for serving language models, which supports prefix reuse

Prefix reuse

Reusing valid computation for an unchanged prefix while keeping that text available as context

Cold / warm cache

Cold: nothing reusable is stored yet. Warm: earlier work is stored and can be reused

Bidirectional attention

Within a bidirectional block, later words can change how earlier ones are represented

Recurrent state

Numerical state the model carries forward as it reads

Head

A small task-specific output part on top of the shared model, such as routing or extraction

Span head

A head that marks exact stretches of text, here the personal data to extract

FLA / Gated DeltaNet

FLA: open-source optimized kernels for linear attention. Gated DeltaNet: the type of computation in Vela that those kernels speed up

BF16, Hopper

BF16: a 16-bit number format. Hopper: the GPU generation used for the vLLM tests

p95

The value 95% of requests are at or below

TTFT

Time to first token: how long until the answer starts appearing

SLO

Service-level objective: a target for responsiveness, such as a maximum wait

Prompt injection

Text crafted to make a model ignore its instructions

Evidence (OmniOps R&D):

1. Earlier Vela/vLLM conversation campaign.

2. Package validation, 18 November 2026: ten cases, 90 measured calls; revision e5b8c4f.

3. Conversation benchmark, 22 October 2026; 64 users.

4. Prefix-reuse campaign, 3 October 2026; 32K context, 64 concurrent requests, two repetitions per condition.

5. Native FLA optimization and quality campaigns, 17 November 2026; 416 original cases plus 48 long-context variants.

Built on Vela3-Flash and vLLM, with credit to the upstream authors. OmniOps contributes runtime adaptation, reuse integration, evaluation and packaging. Studies use separate baselines; gains are not additive.