@mastra/observability 1.6.0-alpha.0 → 1.6.0-alpha.1
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/CHANGELOG.md +20 -0
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -17495,11 +17495,16 @@ function getPackageRoot() {
|
|
|
17495
17495
|
}
|
|
17496
17496
|
}
|
|
17497
17497
|
function makePricingKey(args) {
|
|
17498
|
-
return `${
|
|
17498
|
+
return `${normalizeProvider(args.provider)}::${normalizeKeyPart(args.model)}`;
|
|
17499
17499
|
}
|
|
17500
17500
|
function normalizeKeyPart(value) {
|
|
17501
17501
|
return value.trim().toLowerCase();
|
|
17502
17502
|
}
|
|
17503
|
+
function normalizeProvider(provider) {
|
|
17504
|
+
const normalized = provider.trim().toLowerCase();
|
|
17505
|
+
const dotIndex = normalized.indexOf(".");
|
|
17506
|
+
return dotIndex !== -1 ? normalized.substring(0, dotIndex) : normalized;
|
|
17507
|
+
}
|
|
17503
17508
|
|
|
17504
17509
|
// src/metrics/types.ts
|
|
17505
17510
|
var PricingMeter = {
|