PD005 · neutron design brief · stage: proposal

Autonomous Model Routing — Right Model, Right Effort, per Task

Today a human picks the backend and effort. Headless work — workflows, schedules, intake jobs — needs Neutron to decide: classify the task, apply an operator-owned routing policy, respect budgets and account health, and record why. Routing is deterministic policy over data; the model is consulted only when the policy says so.

stage · proposal decided · policy as data, not code decided · deterministic first, LLM classify last unblocks · PD003 headless steps · cost control

1 · What exists to build on

PieceWhereGives the router
backend registryconfig.ts + custom backendsthe menu: models, lanes, VPN needs
effort ladderengine claude.tsthinking-budget dial per turn
cost trackingproviders/cost.ts + model_pricingper-model price signals, per-agent spend
account poolsclaude-accounts.ts · codex-accounts.tslive availability: benched, limited, pinned
runtime evaluationengine/runtime-evaluation*evidence of which lane handles which work

2 · Routing flow

flowchart LR
  T[task arrives
chat · workflow step ·
schedule · intake job] --> C[classify
deterministic signals first:
source · connector · repo touch ·
prompt shape · attachments] C -->|ambiguous only| L[small-model classify
cheap lane · cached] C --> P[policy table
class × constraints → backend + effort] L --> P P --> H{account health
benched? limited? VPN up?} H -->|primary| R[run] H -->|failover| P R --> E[record: route + reason
cost attributed · outcome fed back]

3 · Example policy (default ship)

Task classBackend laneEffort
chat · attendedinstance default (Claude)medium
coding · intake jobpromoted coding lane (runtime-eval gated)high
review / verifystrongest available lanehigh
workflow glue · extraction · digestscheap lane (GLM / Haiku-class)low
bulk / scheduled sweepscheap lane, subscription pool preferredlow

4 · Guardrails

5 · Phases

  1. Policy table + deterministic router (~4–6 sessions). Class from declared context, admin-editable table, health-aware failover, route recording. Covers all headless work.
  2. Budgets + reporting (~3–4 sessions). Caps, park-on-breach, route/reason surfaced in usage UI.
  3. Classifier + feedback (~4–6 sessions). Small-model fallback for unclassified chat, eval-driven policy proposals to the owner inbox.

6 · Acceptance