Enterprises want to control AI spend: not every task needs a premium model. Smart Router is a general-purpose agent that handles natural-language tasks across all eight Track 1 categories (factual Q&A, math reasoning, sentiment, summarization, NER, code debugging, logic puzzles, code generation) while making as few Fireworks API calls as possible. Each task flows through a single-pass cascade — never a loop: 1) Deterministic solvers (arithmetic parsing, sentiment lexicons, NER gazetteers) resolve trivial prompts at zero cost. 2) A bundled Qwen2.5-3B (4-bit GGUF, llama.cpp, CPU-only) answers most remaining tasks locally — zero tokens by design. 3) A zero-cost confidence gate scores every local answer with per-category heuristics; unreliable categories and low-confidence answers are routed onward. 4) Only the hard residue reaches Fireworks AI, with models resolved from ALLOWED_MODELS at runtime and tight per-category output contracts. Reasoning-model output (inline think blocks, reasoning fields) is handled explicitly so truncated thinking never produces an empty answer. Everything is config-driven — gate thresholds, category-to-model mapping, token budgets, escalation policy. Nothing is hardcoded and no answers are cached. The container degrades gracefully: any local-runtime failure falls back to escalation instead of crashing. Validated end to end in CI under the exact grading constraints (linux/amd64, 4 GB RAM, 2 vCPU): 19 practice tasks in 90 seconds, 1.97 GB compressed image, roughly 900 estimated tokens per full run. Image: ghcr.io/wilfred-dore/track1-smart-router:latest
Category tags: