Commit Graph
2 Commits
Author SHA1 Message Date
lukaszraczylo fd8ca1e95a fix(admin): keep the legacy usage models shape for prompt-cache fields
The three prompt-cache fields are now optional pointers. Only the detail
view sets them, so the default response stays the same as before.
2026-11-26 01:08:48 +00:00
lukaszraczylo d661166eab feat(metrics): count prompt-cache tokens and savings per model
The gateway now counts cache-read, cache-write and uncached prompt tokens
per provider and model as a Prometheus counter. It also writes the read,
write and saved micro-USD totals to the Redis counters.

The admin usage models detail view returns the three totals per model.
Response-cache hits do not count, and free models save nothing.
2026-11-26 01:03:50 +00:00