NeuroRoute NeuroRoute SISL CloudWorx
Login
02How it works/ 9 chapters

Four stages, 1.4 milliseconds

Every request passes through four stages before it reaches a provider. The whole sequence runs in-process, adds a millisecond and a half, and writes a complete record of its own reasoning.

At a glance
Classification accuracy94.2%
Decision latency, p501.4 ms
Candidates scored per call12
Fields logged per decision18
02.1

The four stages

Classification is cheap and local. Scoring is arithmetic over a pricing and quality table refreshed hourly. Nothing in the hot path calls another model.

01

Classify the request

A local classifier labels the request by task type — factual, extraction, summarisation, code, creative, analysis or math — and returns a confidence score. Below your confidence floor, the request falls back to the pinned default rather than guessing.

≈ 0.4 ms · no network call · no tokens billed
02

Assemble the candidate set

Models are filtered to those that satisfy the request: context length, modality, tool support, your allow-list, and current provider health. A degraded provider drops out of consideration automatically.

≈ 0.2 ms · health refreshed every 15 s
03

Score and select

Each surviving candidate is scored on cost, quality, latency and context headroom, weighted by your active strategy. The highest total wins; ties break toward the cheaper model.

≈ 0.5 ms · 12 candidates on a typical call
04

Route, verify, record

The request is forwarded to the winner. In cascade mode the response is checked against the quality bar and escalated if it falls short. Cost, baseline and the full decision trace are written before the response returns.

≈ 0.3 ms + provider time
02.2

How a candidate is scored

Weights are yours to set per strategy. Below is a real scoring pass for a factual lookup under the default Task-Aware weights.

40%
Cost — price per 1M blended tokens
35%
Quality — benchmark score for this task type
20%
Latency — trailing p95 for this provider
5%
Context — headroom against the request size
CandidateProviderCostQualityLatencyTotal
Gemini 2.0 FlashGoogle96917487.4Selected
GPT-4o miniOpenAI93887985.1
Claude Haiku 3.5Anthropic88907182.9
Llama 3.3 70BGroq97796882.0
Claude Sonnet 4Anthropic41965868.2
Quality is task-specific, not a single leaderboard number. Claude Sonnet 4 scores highest overall in this set and still loses — on a factual lookup its extra capability buys nothing and costs 9× more per call.
02.3

Cascade: try cheap first, escalate only on failure

For workloads where a cheap model is usually enough but occasionally isn't, cascade runs the ladder in order and stops at the first response that clears the bar.

Trace · req_5j04mx0
1
Llama 3.1 8B
0.71 — below the 0.80 quality floor
$0.0001
2
Gemini 2.0 Flash
0.86 — accepted, response returned
$0.0011

Total spend $0.0012 against a $0.0366 single-model baseline. The failed attempt is billed and shown — cascade is honest about its own overhead.

Returned on every response
X-Routed-Model: gemini-2.0-flash
X-Request-Cost: $0.001120
X-Baseline-Cost: $0.036600
X-Savings: $0.035480 (96.9%)
X-Task-Type: factual
X-Routing-Strategy: cascade
X-Cascade-Depth: 2
X-Decision-Id: req_5j04mx0

Every header is also written to the decision log, so finance can reconcile a month of spend without instrumenting your application.