fix: include Claude cache tokens in usage

This commit is contained in:
Haileyesus
2026-06-05 15:29:41 +03:00
parent c667b6a179
commit ed9cdf0114
4 changed files with 57 additions and 14 deletions

View File

@@ -592,12 +592,14 @@ class ResponseCollector {
}
}
const inputTokens = totalInput + totalCacheRead + totalCacheCreation;
return {
inputTokens: totalInput,
inputTokens,
outputTokens: totalOutput,
cacheReadTokens: totalCacheRead,
cacheCreationTokens: totalCacheCreation,
totalTokens: totalInput + totalOutput + totalCacheRead + totalCacheCreation
totalTokens: inputTokens + totalOutput
};
}
}