Name the tradeoff once
fast / smart / cheap — change models in one config object. Typed route names so route("smrt") fails at compile time.
const llm = createRouter({
routes: {
fast: { primary: "groq/llama-3.3-70b" },
smart: { primary: "anthropic/claude-4-5" },
cheap: { primary: "openai/gpt-4o-mini" },
},
default: "smart",
})
await llm.route("fast").complete(ticket)