@sagentlab/navarch-runtime 0.1.47 → 0.1.48
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.
|
@@ -142,6 +142,7 @@ function attachOpenCodeOutput(result) {
|
|
|
142
142
|
const cacheRead = nonNegativeMetric(part.tokens?.cache?.read);
|
|
143
143
|
const cacheWrite = nonNegativeMetric(part.tokens?.cache?.write);
|
|
144
144
|
const output = nonNegativeMetric(part.tokens?.output);
|
|
145
|
+
const reasoning = nonNegativeMetric(part.tokens?.reasoning);
|
|
145
146
|
const cost = nonNegativeMetric(part.cost);
|
|
146
147
|
if (input !== undefined || cacheRead !== undefined || cacheWrite !== undefined) {
|
|
147
148
|
tokensIn = (tokensIn ?? 0) + (input ?? 0) + (cacheRead ?? 0) + (cacheWrite ?? 0);
|
|
@@ -149,8 +150,8 @@ function attachOpenCodeOutput(result) {
|
|
|
149
150
|
// as misses (AdapterResult.cacheHitTokensIn semantics).
|
|
150
151
|
cacheHitTokensIn = (cacheHitTokensIn ?? 0) + (cacheRead ?? 0);
|
|
151
152
|
}
|
|
152
|
-
if (output !== undefined)
|
|
153
|
-
tokensOut = (tokensOut ?? 0) + output;
|
|
153
|
+
if (output !== undefined || reasoning !== undefined)
|
|
154
|
+
tokensOut = (tokensOut ?? 0) + (output ?? 0) + (reasoning ?? 0);
|
|
154
155
|
if (cost !== undefined)
|
|
155
156
|
costUsd = (costUsd ?? 0) + cost;
|
|
156
157
|
}
|
package/package.json
CHANGED