ROUTER_AGENT

Created by team coffee-and-bugs on July 06, 2026
Hybrid Token-Efficient Routing Agent

adorable_router — token-efficient LLM routing system adorable_router is a local-first inference router designed to minimize billed tokens while maintaining high accuracy. Instead of sending every task to a large model, it intelligently routes each query through a three-tier cascade that prioritizes zero-token solutions whenever possible. At the first level, a deterministic solver handles well-defined problems such as arithmetic, factorials, GCD/LCM, powers, percentages, and unit conversions. This module only answers when the input is fully parsed and unambiguous, ensuring 100% precision and avoiding common reasoning traps. The second level uses a lightweight local model (TinyLlama) for tasks where small models are reliably accurate—specifically named-entity recognition. This stage is protected by confidence gating, so uncertain outputs are never returned. All remaining tasks are escalated to remote frontier models via Fireworks (Gemma as the primary model, Kimi for code-heavy queries). Prompts are kept compact and outputs are tightly constrained to minimize token usage without sacrificing correctness. A key design principle is that confidence does not equal correctness. The system avoids approximating complex categories like sentiment analysis, logic, or summarization locally, as errors in these areas outweigh token savings. Instead, it favors safe escalation to maintain accuracy. The system operates in a simple containerized pipeline, reading tasks from /input/tasks.json and writing results to /output/results.json. All configuration—including API keys, endpoints, and allowed models—is handled via environment variables, ensuring flexibility and compliance with competition constraints. On a 118-task evaluation harness, adorable_router achieves approximately 0.88 accuracy with 91.5% task completion, while reducing token usage to around 4.4k on the Gemma backend—roughly a 3× improvement over a naive remote-only approach

Category tags: