Most task prompts don't need a frontier model to answer correctly, but you don't know which ones in advance. This agent handles that by trying a small local model first, on every task, at zero cost. After it answers, the model rates its own confidence, and only prompts it isn't sure about get escalated to Fireworks, starting with whatever allowed model looks cheapest. An optional classifier gets a first look too, in case a prompt clearly needs more firepower before local generation even starts. The interesting part was figuring out where this breaks. Some model choices ramble past their token budget and get cut off mid-answer. Some genuinely can't solve certain logic puzzles no matter how they're prompted. Long, complex prompts can quietly eat into the request time limit even without ever calling out remotely. Each of those got found by actually running the thing against real prompts with a real API key, not by guessing, and fixed one at a time.
Category tags: