LocalFirst is a hybrid routing agent for Track 1 that treats the scoring rule as the design constraint: local inference scores zero tokens, so every task is first attempted on a bundled local model (qwen2.5:3b via Ollama, deterministic decoding), and Fireworks AI is called only when the local model cannot be trusted. Trust is determined empirically, not by guesswork. I wrote 60+ stress-test cases plus the official practice tasks and hunted for failures: the local model misclassifies locations that follow organization names, produces self-contradicting answers on assignment puzzles, and misreads relative quantities in word problems. Each unreliable pattern is detected in code and routed to Fireworks (Gemma first, then Kimi, then MiniMax) under a shared per-task time budget that keeps every response under the 30-second limit. The container was validated in CI under the exact grading environment constraints (4GB RAM, 2 vCPU): model warm-up completes in 4 seconds, every task finishes well inside its budget, and the compressed image is 3.6GB, with automatic re-validation on every push. All 8 official practice tasks and an 8-task regression suite pass, with typical Fireworks usage of only a few hundred tokens per run.
Category tags: