Dont count usage when the response was not successful

This commit is contained in:
Owen
2026-08-19 15:58:52 -04:00
parent 5c6da72ec1
commit ef051c2f8c
2 changed files with 31 additions and 13 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ export type AiUsage = {
estimated: boolean;
};
function emptyUsage(): AiUsage {
export function emptyUsage(): AiUsage {
return {
promptTokens: 0,
cacheReadTokens: 0,