@revojs/ai 0.2.47 → 0.2.49
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.
|
@@ -296,6 +296,9 @@ async function* readParts(response, warnings) {
|
|
|
296
296
|
if (chunk.type === "message_delta") {
|
|
297
297
|
if (typeof chunk.delta?.stop_reason === "string") stopReason = chunk.delta.stop_reason;
|
|
298
298
|
if (typeof chunk.usage?.output_tokens === "number") outputTokens = chunk.usage.output_tokens;
|
|
299
|
+
if (chunk.usage?.input_tokens) inputTokens = chunk.usage.input_tokens;
|
|
300
|
+
if (chunk.usage?.cache_read_input_tokens) cacheRead = chunk.usage.cache_read_input_tokens;
|
|
301
|
+
if (chunk.usage?.cache_creation_input_tokens) cacheWrite = chunk.usage.cache_creation_input_tokens;
|
|
299
302
|
}
|
|
300
303
|
}
|
|
301
304
|
for (const record of active.values()) if (record.kind === "tool_use") yield {
|