A general-purpose AI agent that answers eight task categories while spending zero Fireworks tokens.
Track 1 ranks submissions that pass an LLM-judged accuracy gate by total Fireworks tokens, ascending. The rules state that local inference inside the container counts fully toward accuracy — and zero toward the token score. So the winning router is the one that never has to leave the box.
Maps each prompt to one of 8 capability categories. Deterministic, microseconds, free.
4-bit quantized, 1.3 GB, category-tuned prompts. Answers everything for zero tokens. Logic puzzles get a 3-sample majority vote; generated code executes its own tests before answering.
The smallest model in ALLOWED_MODELS, called through FIREWORKS_BASE_URL — only if the local path fails or time runs low. In normal runs it is never touched.
The agent measures real tokens/sec after a warm-up request and sizes every generation so the batch finishes inside the 10-minute cap.
Light categories run first; if time gets tight only the reasoning-heavy tasks see smaller budgets.
Generated code is executed against separately generated asserts inside the container; failures trigger one corrected retry.
Math and logic answers always end with a final Answer: line — truncations trigger a compact free retry.
results.json is always written, always valid JSON, and the container always exits 0.
FIREWORKS_API_KEY, FIREWORKS_BASE_URL, ALLOWED_MODELS — read at runtime, nothing hardcoded.
docker run --rm --cpus=2 --memory=4g \ -v "$PWD/input:/input:ro" -v "$PWD/output:/output" \ ghcr.io/sheetaljatav/phoenix-router:latest
Reads /input/tasks.json, writes /output/results.json. Image is linux/amd64, ~2 GB compressed, rebuilt on every push by GitHub Actions.