I wrote about our AI pipeline costs a while back. The comments were better than the post.

Valentin Monteiro made the point that cache alerts should be keyed per prompt version rather than on a global ratio, because a global number moves for boring reasons. Tae Kim pointed at how prompt caching fails silently, where a breakpoint on anything per-request gives you a miss on every call that logs exactly like a hit. Both need the same thing underneath, and I said I'd get cache metrics into our provenance records.

That turned into a bigger job than I expected. Here's what came out of it, what it costs, and the two parts I still haven't worked out.

Why store more than the output?

Because the output can't tell you whether something was always broken or broke last Tuesday, whether it's one record or ten thousand, or whether you changed something or the vendor did.