EXPERIMENT_018 // REASONING.BUDGET.ROUTER

Reasoning Budget Router

Submit a task and watch a heuristic classifier score its complexity, route it to the cheapest model tier that can handle it, then run the real call and chart the cost and latency you'd have paid at each tier — the fleet's own model-tiering instinct made explicit and measurable.

TEXT INPUTCREATED 2026.07.13BETA

LOADING EXPERIMENT...

Type a task — a quick factual question, a structured summary, a design brief — or click one of five preset examples. A deterministic classifier scores the task's complexity from its length, clause structure, and reasoning-signal keywords, then routes it to one of three OpenAI model tiers: fast (nano), balanced (mini), or deep (5.5). The call runs for real, and the routing decision, rationale, latency, and USD cost land in a running table and a pair of cost/latency charts, so the trade-off across a set of tasks is visible, not assumed.

HOW IT WORKS

A deterministic classifier, not a model call

Complexity is scored from word count, clause/sentence count, and the presence of reasoning-signal keywords (compare, trade-off, architecture, justify, evaluate) versus trivial-lookup signals (what is, list, define) — entirely in-process, with no LLM call and no added latency or cost before the routing decision is made.

Three tiers, one toolkit

All three tiers route through `@diabolicallabs/llm-client` against OpenAI, with only the model string swapped per tier — gpt-5.4-nano for fast, gpt-5.4-mini for balanced, gpt-5.5 for deep — mirroring how the fleet's own opusplan tiering picks a model by task shape rather than defaulting to the most capable option every time.

Fail safe, not fail cheap

If the classifier itself throws — a genuine error, or the experiment's own "simulate classifier failure" toggle — the router defaults to the deep tier rather than guessing low. Silently picking the cheapest tier on a classification failure would be the one failure mode that actually costs money: an under-routed hard task either fails outright or produces a worse answer than the tier it should have used.

Cost and latency, recorded per run

Every routed call carries its real USD cost (via `@diabolicallabs/llm-pricing`, wired through the toolkit's built-in cost tracking) and measured latency. Results accumulate across a session into a table and two Recharts bar charts — cost per run and latency per run, coloured by tier — so the trade-off is visible across a set of tasks, not just a single one.

WHAT THIS PROVES

Task-complexity routing does not require an LLM to classify the task — a handful of structural signals (length, clause count, reasoning keywords) are enough to make a defensible tiering decision, and skipping the classification LLM call removes an entire failure surface and cost line from the pipeline before the real work even starts.

A routing system's safe default matters more than its classifier's average accuracy: this experiment's classifier-failure path always resolves to the most capable tier, not the cheapest, which is the one design choice that keeps a broken classifier from silently turning into a broken (or just wrong) answer downstream.

← BACK TO PLAYGROUND

SYSTEM.INT // 2026 LABS_CORE v2.78.2

LATENCY: STATUS: NOMINAL