Model Routing

Automatic tier-based model selection routes each query to the most appropriate model: Fast, Primary, or Smart.

Tiers

TierUse CaseTypical Model
FastSimple greetings, yes/no, short lookupsgpt-4o-mini, claude-3-haiku
PrimaryGeneral conversation, moderate tasksgpt-4o, claude-3.5-sonnet
SmartComplex reasoning, code generation, analysiso1-preview, claude-3-opus

Classification Rules

Smart Tier (complex tasks)

A query is classified as Smart if any of these are true:

  • Contains a code fence (```)
  • Message length > 500 characters
  • Contains 3+ question marks
  • Contains keywords: implement, refactor, debug, analyze, step by step, write code, architecture, optimize, algorithm, explain how, write a, build a, create a function, design, compare and contrast, walk me through, troubleshoot, review this, fix this, rewrite

Fast Tier (simple queries)

A query is classified as Fast if any of these are true:

  • Exact match greetings/acknowledgments: hi, hello, hey, thanks, ok, yes, no, sure, bye, goodbye, ty, cool, nice, great, awesome, lol, haha, wow (case insensitive)
  • Single word message
  • Short message: <20 chars AND ≤3 words
  • Simple lookup prefix (what is, who is, define, when is, where is) + ≤6 total words

Primary Tier (default)

Everything else falls to the Primary tier.

Disabling Auto-Routing

  • If all three model tiers are the same, routing is automatically disabled
  • Sending /model <name> in Telegram disables routing (manual override)
  • Sending /auto re-enables automatic routing