TokenOptimizer is a hybrid, token-efficient routing agent for Track 1. It treats the leaderboard as what it is — an accuracy gate followed by a race to the fewest Fireworks tokens — and optimizes directly for that. Every task first hits free, deterministic solvers: an exact arithmetic/percentage/average calculator, a transitive-ordering solver for comparative logic puzzles, and a syllogism checker. Whatever they can prove is answered for zero tokens. Remaining tasks go to a small local model (Qwen2.5-Coder-3B via Ollama, baked into the image) whose answers are checked with free verifiers — valid number, parseable JSON, compilable code, real sentiment label, length constraints — plus self-consistency sampling. Only genuinely uncertain tasks escalate to a Fireworks model, using a ~3-token system prompt, compressed input, a capped max_tokens, and reasoning_effort=low to keep completion tokens minimal. The solvers are red-teamed to never emit a wrong answer — they defer to the model whenever unsure — so the accuracy gate is protected while local-first routing drives token usage toward zero. It ships as a self-testing linux/amd64 Docker image that reads ALLOWED_MODELS from the environment and handles all eight capability categories: factual Q&A, math, sentiment, summarization, NER, code debugging, logic, and code generation.
Category tags: