neatlogs 1.1.7 → 1.1.8
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/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -1
- package/dist/mastra-wrap.cjs +12 -0
- package/dist/mastra-wrap.cjs.map +1 -1
- package/dist/mastra-wrap.mjs +12 -0
- package/dist/mastra-wrap.mjs.map +1 -1
- package/dist/opencode-plugin.cjs +1 -1
- package/dist/opencode-plugin.cjs.map +1 -1
- package/dist/opencode-plugin.mjs +1 -1
- package/dist/opencode-plugin.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5992,7 +5992,7 @@ function _resetMastraCache() {
|
|
|
5992
5992
|
}
|
|
5993
5993
|
|
|
5994
5994
|
// src/version.ts
|
|
5995
|
-
var __version__ = "1.1.
|
|
5995
|
+
var __version__ = "1.1.8";
|
|
5996
5996
|
|
|
5997
5997
|
// src/init.ts
|
|
5998
5998
|
var logger13 = getLogger();
|
|
@@ -10154,8 +10154,20 @@ function recordUsage(span2, usage) {
|
|
|
10154
10154
|
const prompt = tokenValue(usage.promptTokens ?? usage.inputTokens ?? usage.input_tokens);
|
|
10155
10155
|
const completion = tokenValue(usage.completionTokens ?? usage.outputTokens ?? usage.output_tokens);
|
|
10156
10156
|
const total = tokenValue(usage.totalTokens);
|
|
10157
|
+
const reasoning = tokenValue(
|
|
10158
|
+
usage.reasoningTokens ?? usage.outputTokens?.reasoning ?? usage.output_tokens?.reasoning
|
|
10159
|
+
);
|
|
10160
|
+
const cacheRead = tokenValue(
|
|
10161
|
+
usage.cachedInputTokens ?? usage.cacheReadInputTokens ?? usage.cache_read_input_tokens ?? usage.inputTokens?.cacheRead ?? usage.input_tokens?.cache_read
|
|
10162
|
+
);
|
|
10163
|
+
const cacheWrite = tokenValue(
|
|
10164
|
+
usage.cacheCreationInputTokens ?? usage.cacheWriteInputTokens ?? usage.cache_creation_input_tokens ?? usage.inputTokens?.cacheWrite ?? usage.input_tokens?.cache_write
|
|
10165
|
+
);
|
|
10157
10166
|
if (prompt != null) span2.setAttribute("neatlogs.llm.token_count.prompt", prompt);
|
|
10158
10167
|
if (completion != null) span2.setAttribute("neatlogs.llm.token_count.completion", completion);
|
|
10168
|
+
if (reasoning != null) span2.setAttribute("neatlogs.llm.token_count.reasoning", reasoning);
|
|
10169
|
+
if (cacheRead != null) span2.setAttribute("neatlogs.llm.token_count.cache_read", cacheRead);
|
|
10170
|
+
if (cacheWrite != null) span2.setAttribute("neatlogs.llm.token_count.cache_write", cacheWrite);
|
|
10159
10171
|
if (total != null) span2.setAttribute("neatlogs.llm.token_count.total", total);
|
|
10160
10172
|
else if (prompt != null && completion != null) {
|
|
10161
10173
|
span2.setAttribute("neatlogs.llm.token_count.total", prompt + completion);
|