TokenMiser — every token earns its place. Track 1 ranks agents by total Fireworks tokens after an accuracy gate. The trap: pass the gate with terse answers, but not so terse they fail. TokenMiser's edge came from a discovery — every model in ALLOWED_MODELS emits hidden reasoning tokens by default, billed invisibly in completion_tokens. A one-word answer cost 127 tokens on the heaviest model; the answer itself was 2. After testing every documented switch, exactly one worked across all model families: reasoning_effort:"none", cutting calls by up to 98%. Architecture. A pure-Python classifier (zero API calls) buckets each task into one of 8 categories: factual, math, sentiment, summarization, NER, code-debug, logic, code-gen. A router sends each to kimi-k2p7-code with reasoning disabled, a per-category instruction engineered to satisfy the judge in minimal tokens, and a tight max_tokens cap sized from measured maxima. A pure-Python validator checks every answer — JSON parses, code compiles via AST, math has a final value — and escalates failures with one retry. Hard-won lessons. Deleting instructions backfired: bare models ramble and cost more, so each category keeps a minimal-viable instruction. Math and logic keep terse visible working, because with reasoning off the visible steps ARE the computation — pure answer-only math produced silently-wrong arithmetic. The deepest lesson came from production: reasoning models return output in a separate reasoning_content field, and a naive client crashes when the cap truncates thinking before the answer. TokenMiser handles this — a startup probe detects non-compliant models and widens caps, truncations retry, every task always gets a valid answer. The container reads all config at runtime, uses only permitted models, builds for linux/amd64, exits cleanly, and never crashes its way to a zero — surviving a model environment it has never seen.
Category tags: