getaimeter 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/watcher.js +4 -0
package/package.json
CHANGED
package/watcher.js
CHANGED
|
@@ -84,6 +84,10 @@ function extractNewUsage(filePath) {
|
|
|
84
84
|
|
|
85
85
|
if (obj.type !== 'assistant' || !obj.message || !obj.message.usage) continue;
|
|
86
86
|
|
|
87
|
+
// Skip streaming progress messages (stop_reason: null = not yet complete)
|
|
88
|
+
// Only count final responses with a real stop_reason
|
|
89
|
+
if (obj.message.stop_reason === null || obj.message.stop_reason === undefined) continue;
|
|
90
|
+
|
|
87
91
|
const u = obj.message.usage;
|
|
88
92
|
const model = obj.message.model || 'unknown';
|
|
89
93
|
|