Most routing agents still pay an LLM to decide where to route. ZeroFirst refuses to spend a single token on a decision it can make for free — and refuses to spend one on an answer it can prove for free. The agent runs three layers, cheapest first. Layer 0 — Deterministic solvers, zero Fireworks tokens. Arithmetic is evaluated through a safe AST evaluator, so math is not "probably right", it is provably right. Sentiment is resolved by lexicon scoring. Named entities are extracted by a positional-capitalisation heuristic that discounts sentence-initial words. These answers cost nothing and cannot hallucinate. Layer 1 — Zero-token classification. Tasks are sorted into eight categories (math, sentiment, NER, factual, summarisation, logic, code debugging, code generation) by regex and heuristics. No model is consulted to decide where a task goes, so routing itself is free. Layer 2 — Cheapest sufficient model. Only what Layer 0 cannot prove reaches Fireworks. Factual and summarisation tasks route to Gemma 2 9B; only logic and code escalate to a stronger model. Every paid call is deliberately token-starved: temperature 0, a hard per-category max_tokens cap, and a system prompt that forbids reasoning, preamble and markdown. Chain-of-thought is what dominates the token bill on this task, so we suppress it outright rather than paying for prose nobody scores. Gemma is the default paid tier, so the majority of billed inference runs on Gemma via Fireworks. Shipped as a public linux/amd64 container with a public GitHub repository and setup instructions.
Category tags: