Smart Model Router & Fallbacks
Routes simple steps to fast cheap models, hard steps to frontier models, and fails over automatically on outages.
Every tiny classification burns expensive frontier tokens, and one provider 503 outage halts everything.
Routine triage runs on fast low-cost models, hard tasks escalate cleanly, and provider outages auto-failover.
What It Does (In Plain English)
Model Router manages versioned routing policies (model-router@1). It picks models by task profile/tier, tracks provider errors, puts failing providers into automatic cooldown backoff, and falls back smoothly to backup models without failing your customer’s task.
Real-World Example
- 1Routine ticket triage routes to a fast, low-cost model.
- 2Primary provider returns 503 → Model Router logs
model.route_fallback, cools it down, and shifts to backup. - 3Routing policies themselves are versioned and testable in held-out eval trials.
When Should You Turn It On?
Enterprise Edition. Add when running multiple LLM providers, cost tiers, or strict uptime SLAs.
Safety level note: Level 1 · Review — Read-only. Can inspect and answer, never changes outside systems.
How to Add It (workspace.yaml)
# Enterprise Edition (@neusym/kit-model-router)
kits:
- "@neusym/kit-model-router@0.1.0"
kitConfigs:
model-router:
defaultRoute: balanced
failureThreshold: 3Kits It Works With
Technical Details & Configuration Options (9 settings)
| Package | @neusym/kit-model-router |
|---|---|
| Provides Ports | model-router@1 |
| Requires Ports | None |
| Optional Ports | model@1tasks@1model-registry@1 |
| Publishes Events | model.route_fallback |
| Owned DB Collections | model_routesmodel_healthmodel_route_stats |
Configuration Options (kitConfigs.model-router)
| Setting | Type | Default | Description |
|---|---|---|---|
defaultRoute | string | "default" | — |
failureThreshold | integer | 2 | — |
cooldownMs | integer | 30000 | — |
maxCooldownMs | integer | 300000 | — |
routingStrategy | string | "static" | — |
ucbExplorationC | number | 0.6 | — |
ucbCostWeight | number | 0.2 | — |
ucbLatencyWeight | number | 0.1 | — |
routes | object | {} | — |