I run a multi-provider LLM gateway in production (OpenAI, Anthropic, Google, DeepSeek and a dozen others behind one endpoint) with prepaid, per-token billing. Getting the metering correct took more iterations than the entire proxy itself. Here is what I wish someone had told me. One request is never one price A single chat request produces up to six differently priced components: text input, cached input, cache writes, output, reasoning tokens, and tool units (web search calls, image generat...