@mastra/observability 1.19.0-alpha.1 → 1.19.0-alpha.3
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 +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics/estimator.d.ts.map +1 -1
- package/dist/model-tracing.d.ts +5 -0
- package/dist/model-tracing.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1603,7 +1603,7 @@ function estimateCosts(args, pricingRegistry = PricingRegistry.getGlobal()) {
|
|
|
1603
1603
|
}
|
|
1604
1604
|
if (usage.outputDetails?.reasoning) {
|
|
1605
1605
|
const result = estimateCostForMeter({
|
|
1606
|
-
meter: PricingMeter.OUTPUT_REASONING_TOKENS,
|
|
1606
|
+
meter: pricingTier.hasMatchingMeterForUsage(PricingMeter.OUTPUT_REASONING_TOKENS) ? PricingMeter.OUTPUT_REASONING_TOKENS : PricingMeter.OUTPUT_TOKENS,
|
|
1607
1607
|
tokenCount: usage.outputDetails.reasoning,
|
|
1608
1608
|
...estimateFields
|
|
1609
1609
|
});
|
|
@@ -2472,6 +2472,16 @@ var ModelSpanTracker = class {
|
|
|
2472
2472
|
});
|
|
2473
2473
|
}
|
|
2474
2474
|
/**
|
|
2475
|
+
* End the open MODEL_INFERENCE span as interrupted while keeping MODEL_STEP open,
|
|
2476
|
+
* so a replacement request for the same step gets its own inference span.
|
|
2477
|
+
*/
|
|
2478
|
+
interruptInference() {
|
|
2479
|
+
this.#endChunkSpan();
|
|
2480
|
+
if (!this.#currentInferenceSpan) return;
|
|
2481
|
+
this.#currentInferenceSpan.end({ attributes: { finishReason: "interrupted" } });
|
|
2482
|
+
this.#currentInferenceSpan = void 0;
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2475
2485
|
* Update the current step span with additional payload data.
|
|
2476
2486
|
* Called when step-start chunk arrives with request/warnings info.
|
|
2477
2487
|
*/
|