The model picker — when Sonnet is wrong and Haiku is right — step 7 of 8
Write pick_model(task) that takes a task dict and returns one of
"haiku", "sonnet", or "opus".
The task dict has four fields:
kind: string (e.g.,"ticket_tagger")volume_per_day: intlatency_ms_max: intcriticality: one of"low","medium","high"
Routing rules, in order:
- High-volume task (
volume_per_day >= 10000): route to"haiku"UNLESScriticality == "high", in which case route to"sonnet"(we don't trust Haiku on the high-stakes hot path). - Rare + critical (
volume_per_day < 100ANDcriticality == "high"): route to"opus". The call is rare enough that cost doesn't matter and the answer needs to be right. - Default: route to
"sonnet". The general-purpose workhorse.
Two tasks run for you. Expected output:
ticket_tagger -> haiku
contract_review -> opus
⌘↵ runs the editor.read, then continue.
Write pick_model(task) that takes a task dict and returns one of
"haiku", "sonnet", or "opus".
The task dict has four fields:
kind: string (e.g.,"ticket_tagger")volume_per_day: intlatency_ms_max: intcriticality: one of"low","medium","high"
Routing rules, in order:
- High-volume task (
volume_per_day >= 10000): route to"haiku"UNLESScriticality == "high", in which case route to"sonnet"(we don't trust Haiku on the high-stakes hot path). - Rare + critical (
volume_per_day < 100ANDcriticality == "high"): route to"opus". The call is rare enough that cost doesn't matter and the answer needs to be right. - Default: route to
"sonnet". The general-purpose workhorse.
Two tasks run for you. Expected output:
ticket_tagger -> haiku
contract_review -> opus
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.