{{define "content"}}
{{with .Summary.Today}}
Requests Today
{{.Requests}}
Cost Today
{{formatCost .CostUSD}}
Tokens Today
{{addInt .InputTokens .OutputTokens}}
{{.InputTokens}} in / {{.OutputTokens}} out
Errors Today
{{.Errors}}
Cache Hits
{{.CachedHits}}
{{end}} {{with .Summary.Week}}
Cost (7d)
{{formatCost .CostUSD}}
{{end}}
{{if .ProviderHealth}}

Provider Health

{{range .ProviderHealth}}
{{.Provider}} {{.Status}} {{if eq .CircuitState "open"}}circuit open{{end}} {{if eq .CircuitState "half-open"}}half-open{{end}} {{printf "%.0f" .AvgLatency}}ms avg | {{formatPct .ErrorRate}} errors
{{end}}
{{end}} {{if .Latency}}{{if gt .Latency.Max 0.0}}
P50 Latency
{{printf "%.0f" .Latency.P50}}ms
P95 Latency
{{printf "%.0f" .Latency.P95}}ms
P99 Latency
{{printf "%.0f" .Latency.P99}}ms
Avg Latency
{{printf "%.0f" .Latency.Avg}}ms
{{end}}{{end}} {{if .CacheEnabled}}{{if .CacheInfo}}{{if .CacheInfo.Connected}}
Cache Hit Rate
{{formatPct .CacheInfo.HitRate}}
{{.CacheInfo.Hits}} hits / {{.CacheInfo.Misses}} misses
Cache Memory
{{.CacheInfo.MemoryUsed}}
Cached Keys
{{.CacheInfo.Keys}}
{{end}}{{end}}{{end}}

Requests & Cost

Cost Breakdown

{{if .Models}}

ModelsCSVJSON

{{range .Models}} {{end}}
ModelRequestsTokens (in/out)CostAvg Latency
{{.Model}} {{.Requests}} {{.InputTokens}} / {{.OutputTokens}} {{formatCost .CostUSD}} {{printf "%.0f" .AvgLatencyMS}}ms
{{end}} {{if .Providers}}

ProvidersCSVJSON

{{range .Providers}} {{end}}
ProviderRequestsSuccessErrorsAvg LatencyCost
{{.Provider}} {{.Requests}} {{.Successes}} {{.Errors}} {{printf "%.0f" .AvgLatencyMS}}ms {{formatCost .CostUSD}}
{{end}} {{if .TokenStats}}

API Token UsageCSVJSON

{{range .TokenStats}} {{end}}
TokenRequestsTokens (in/out)Cost
{{.TokenName}} {{.Requests}} {{.InputTokens}} / {{.OutputTokens}} {{formatCost .CostUSD}}
{{end}}
{{end}}