mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
feat(admin): show prompt-cache hit rate per model
The usage model table and the model panel now show the prompt-cache hit rate. The Cost avoided card shows the prompt-cache saving as a separate line. The mock admin API fixtures carry the new fields.
This commit is contained in:
@@ -561,6 +561,10 @@ export interface AdminUsageModelEntry {
|
||||
/** Cache hits/savings for this model today — present only when `detail=1` AND AdminFeaturesView.cacheStats is on (admin.go). cacheSavedMicroUsd is micro-USD, same unit as costMicroUsd. */
|
||||
cacheHits?: number
|
||||
cacheSavedMicroUsd?: number
|
||||
/** Provider prompt-cache usage — `detail=1` only (admin.go). Read/write are input-token counts; saved is micro-USD vs full input price. */
|
||||
promptCacheReadTokens?: number
|
||||
promptCacheWriteTokens?: number
|
||||
promptCacheSavedMicroUsd?: number
|
||||
/** Count of 402 (unpriced-refusal) responses for this model today — `detail=1` only (admin.go). */
|
||||
r402?: number
|
||||
/** This model's billing price source — `detail=1` only (admin.go). */
|
||||
|
||||
Reference in New Issue
Block a user