Skip to content

Model Routing

The orchestrator classifies every task by complexity before work begins. Trivial tasks use the cheapest model. Complex tasks get the best reasoning power.

Routing table

ComplexityModelExamples
TrivialHaikuRename, typo, format, version bump
StandardSonnetFeature (<5 files), bug fix, test writing
ComplexOpusArchitecture, security audit, auth, payments

Escalation rules

  • Always Complex: authentication, payment processing, database schema, security audit
  • Never downgrade: once assigned, a task stays at its tier for the session
  • Code review always Complex: structural audits need highest reasoning
  • Domain override: mk:scale-routing checks a CSV of domain keywords (fintech, healthcare → force COMPLEX)

Domain-based routing (Phase 0)

Before manual classification, mk:scale-routing reads keywords from the task and matches against domain-complexity.csv:

DomainKeywordsEffect
fintechpayment, stripe, billing, invoiceForce COMPLEX
healthcarehipaa, phi, ehr, patient dataForce COMPLEX
authoauth, jwt, session, credentialsForce COMPLEX
docsreadme, changelog, commentAllow one-shot
configenv, .yaml, version bumpAllow one-shot

The CSV is user-editable. Add rows for your project's domains. Scale-routing verdicts cannot be downgraded mid-task.

Planning depth per mode

ModeResearchersApproach
strict, architect2 (parallel)Competing approaches, forced synthesis
default, audit1Standard depth
fast, cost-saver, document0Skip research

Adaptive density

For harness builds, density auto-adjusts per model tier: Haiku → MINIMAL, Sonnet → FULL, Opus 4.6+ → LEAN. See Adaptive Density.

See also

Released under the MIT License.