04PAWN

June 2026 · Single HTML file, OpenRouter public catalog, Node test suite
PAWN · 2:26
01What I was trying to learn

I had a tidy blueprint for tiered routing, cheap models first and escalate on failure, and I wanted to know whether the savings survive contact with real pricing: cache reads and writes, batch discounts, escalation overhead, and failed attempts still billed at the tier that failed. PAWN was my way of putting numbers on that instead of arguing about it.

02What I built

A single HTML application that forecasts LLM spend across a tiered architecture. It discovers priced text models across OpenRouter providers from the public catalog, keeps a local fallback snapshot, refreshes selected models without disturbing manual overrides, and saves scenarios as portable JSON. Version 1.0 fixed the original's model-discovery problem: it had only ever repriced its fourteen bundled records. A forensic review of that original, with the before-file and its hash, is in the repo.

03What it taught me about the real job

The arithmetic was the easy part. The version I built in June was quietly wrong by October: its model list and prices had frozen while still looking current, and an unknown cache-write price was being counted as free savings. The real job is keeping the inputs honest: knowing where every number came from and when, saying “unknown” instead of guessing zero, and treating the forecast as directional until you have measured hit rates and escalation rates from production.

I get AI out of the pilot.

(It's less glamorous than it sounds and more valuable than it looks.)

Eric Ediger
Ask the archive

Reads only the essays, case studies and prototypes published on this site, and names the piece it drew on. Nothing typed here is stored.