TokenOptimizer — Hybrid Routing System

Created by team Yashasvi Thakur on July 10, 2026
Hybrid Token-Efficient Routing Agent

TokenOptimizer is a general-purpose AI agent built for Track 1, where submissions are ranked by fewest Fireworks tokens subject to an accuracy gate over 19 hidden tasks spanning eight categories: factual, math, sentiment, summarization, named-entity recognition, code debugging, logic, and code generation. The agent minimizes cost through layered routing. A lightweight classifier first identifies each task's category. Provable arithmetic, percentage, ordering, and syllogism problems are answered by free deterministic solvers at zero tokens, with conservative guards that defer to the model whenever an answer cannot be fully proven. Every remaining task is sent as a single reasoning-model call with token-minimal, category-specific prompts. The core optimization disables the model's hidden reasoning trace and, for multi-step math and logic, replaces it with a compact visible chain-of-thought that ends in a parseable final line — reasoning in roughly seventy visible tokens instead of several hundred billed-hidden ones. Further passes strip markdown code fences, normalize output for exact-match judging, and recover answers from truncated traces. Robustness is treated as a scoring requirement: verbatim model calls, a model-failover chain, strict per-task time bounds, atomic output writes, and always-valid JSON. The agent clears the accuracy gate at 17/19 while driving token cost toward the leaderboard frontier.

Category tags: