1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-12-02 20:22:52 +00:00

include upstream inference cost for byok

This commit is contained in:
Laura
2025-10-03 19:14:12 +02:00
parent ca1e1c3eef
commit d3d487d314
2 changed files with 5 additions and 1 deletions

View File

@@ -45,6 +45,10 @@ func HandleStats(w http.ResponseWriter, r *http.Request) {
Time: Nullable(generation.GenerationTime, 0),
}
if generation.IsBYOK && generation.UpstreamInferenceCost != nil {
statistics.Cost += *generation.UpstreamInferenceCost
}
nativeIn := Nullable(generation.NativeTokensPrompt, 0)
normalIn := Nullable(generation.TokensPrompt, 0)