Cheapskate Router

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

Cheapskate Router is a token-efficient AI agent built for Track 1 of the AMD Developer Hackathon: ACT II. It handles eight task categories — factual Q&A, mathematical reasoning, sentiment classification, text summarization, named entity recognition, code debugging, logical/deductive reasoning, and code generation — by intelligently routing each task to the most cost-effective Fireworks AI model that can still answer it accurately. How it works: Zero-token classification: Each incoming task is categorized using a lightweight, regex-based classifier — no model call, no tokens spent, before any routing decision is made. Category-aware routing: Tasks are routed to the model best suited for that category, with automatic fallback logic if a preferred model is unavailable in the allowed model list. Reasoning-effort tuning: All calls use a low reasoning-effort setting to avoid burning tokens on unnecessary hidden reasoning traces. Brevity-optimized prompting: A carefully tuned system prompt strips unnecessary formatting (headers, tables, restated questions) from responses without sacrificing correctness or completeness — with category-specific overrides (e.g. ensuring NER never drops date/time entities). Local self-verification: For code-generation and code-debugging tasks, generated code is locally validated with Python's ast parser before being accepted — completely free, zero-token verification that catches syntax errors and triggers a single automatic retry only when actually needed. Resilient by design: Every task is wrapped in error handling so a single failure never crashes the full run; the agent always produces valid output in the required schema. The result is a lean, dependable agent that clears the accuracy bar across all eight categories while keeping Fireworks token usage as low as possible — the core tradeoff the hackathon track is built around.

Category tags: