veryfront 0.1.955 → 0.1.957
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/esm/cli/commands/eval/command-help.d.ts.map +1 -1
- package/esm/cli/commands/eval/command-help.js +5 -0
- package/esm/cli/commands/eval/command.d.ts +15 -2
- package/esm/cli/commands/eval/command.d.ts.map +1 -1
- package/esm/cli/commands/eval/command.js +158 -14
- package/esm/cli/commands/eval/handler.d.ts +2 -0
- package/esm/cli/commands/eval/handler.d.ts.map +1 -1
- package/esm/cli/commands/eval/handler.js +2 -0
- package/esm/deno.js +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-chat-stream.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-chat-stream.js +25 -0
- package/esm/extensions/ext-llm-openai/src/openai-provider.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-provider.js +25 -0
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-chunk-encoder.js +32 -0
- package/esm/src/agent/ag-ui/browser-encoder.d.ts +6 -0
- package/esm/src/agent/ag-ui/browser-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-encoder.js +70 -0
- package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-finalize-tracker.js +18 -0
- package/esm/src/agent/runtime/chat-stream-handler.d.ts +16 -0
- package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
- package/esm/src/agent/runtime/chat-stream-handler.js +24 -0
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +8 -0
- package/esm/src/agent/runtime/input-utils.d.ts +16 -0
- package/esm/src/agent/runtime/input-utils.d.ts.map +1 -1
- package/esm/src/agent/runtime/input-utils.js +29 -0
- package/esm/src/agent/runtime/runtime-tool-types.d.ts +16 -0
- package/esm/src/agent/runtime/runtime-tool-types.d.ts.map +1 -1
- package/esm/src/agent/schemas/agent.schema.d.ts +8 -0
- package/esm/src/agent/schemas/agent.schema.d.ts.map +1 -1
- package/esm/src/agent/schemas/agent.schema.js +8 -0
- package/esm/src/eval/agent-service.d.ts.map +1 -1
- package/esm/src/eval/agent-service.js +39 -1
- package/esm/src/eval/index.d.ts +1 -1
- package/esm/src/eval/index.d.ts.map +1 -1
- package/esm/src/eval/metrics.d.ts.map +1 -1
- package/esm/src/eval/metrics.js +7 -2
- package/esm/src/eval/model-comparison.d.ts.map +1 -1
- package/esm/src/eval/model-comparison.js +229 -7
- package/esm/src/eval/report.d.ts.map +1 -1
- package/esm/src/eval/report.js +42 -4
- package/esm/src/eval/studio.d.ts +22 -0
- package/esm/src/eval/studio.d.ts.map +1 -1
- package/esm/src/eval/studio.js +11 -0
- package/esm/src/eval/types.d.ts +52 -0
- package/esm/src/eval/types.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.js +60 -0
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
|
@@ -102,6 +102,8 @@ function normalizeUsage(usage) {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
const flatUsage = usage;
|
|
105
|
+
const costSource = flatUsage.costSource;
|
|
106
|
+
const usageCaptureStatus = flatUsage.usageCaptureStatus;
|
|
105
107
|
return {
|
|
106
108
|
inputTokens: flatUsage.inputTokens,
|
|
107
109
|
outputTokens: flatUsage.outputTokens,
|
|
@@ -120,6 +122,28 @@ function normalizeUsage(usage) {
|
|
|
120
122
|
...(typeof flatUsage.reasoningTokens === "number"
|
|
121
123
|
? { reasoningTokens: flatUsage.reasoningTokens }
|
|
122
124
|
: {}),
|
|
125
|
+
...(typeof flatUsage.billableInputTokens === "number"
|
|
126
|
+
? { billableInputTokens: flatUsage.billableInputTokens }
|
|
127
|
+
: {}),
|
|
128
|
+
...(typeof flatUsage.billableOutputTokens === "number"
|
|
129
|
+
? { billableOutputTokens: flatUsage.billableOutputTokens }
|
|
130
|
+
: {}),
|
|
131
|
+
...(typeof flatUsage.costUsd === "number" ? { costUsd: flatUsage.costUsd } : {}),
|
|
132
|
+
...(typeof flatUsage.providerCostUsd === "number"
|
|
133
|
+
? { providerCostUsd: flatUsage.providerCostUsd }
|
|
134
|
+
: {}),
|
|
135
|
+
...(typeof flatUsage.veryfrontChargeUsd === "number"
|
|
136
|
+
? { veryfrontChargeUsd: flatUsage.veryfrontChargeUsd }
|
|
137
|
+
: {}),
|
|
138
|
+
...(typeof flatUsage.costCredits === "number" ? { costCredits: flatUsage.costCredits } : {}),
|
|
139
|
+
...(costSource === "gateway" || costSource === "missing" || costSource === "partial"
|
|
140
|
+
? { costSource }
|
|
141
|
+
: {}),
|
|
142
|
+
...(usageCaptureStatus === "complete" ||
|
|
143
|
+
usageCaptureStatus === "missing" ||
|
|
144
|
+
usageCaptureStatus === "partial"
|
|
145
|
+
? { usageCaptureStatus }
|
|
146
|
+
: {}),
|
|
123
147
|
};
|
|
124
148
|
}
|
|
125
149
|
function normalizeFinishReason(finishReason) {
|
|
@@ -306,6 +330,24 @@ function streamUsageToGenerateUsage(totalUsage) {
|
|
|
306
330
|
...(totalUsage.reasoningTokens !== undefined
|
|
307
331
|
? { reasoningTokens: totalUsage.reasoningTokens }
|
|
308
332
|
: {}),
|
|
333
|
+
...(totalUsage.billableInputTokens !== undefined
|
|
334
|
+
? { billableInputTokens: totalUsage.billableInputTokens }
|
|
335
|
+
: {}),
|
|
336
|
+
...(totalUsage.billableOutputTokens !== undefined
|
|
337
|
+
? { billableOutputTokens: totalUsage.billableOutputTokens }
|
|
338
|
+
: {}),
|
|
339
|
+
...(totalUsage.costUsd !== undefined ? { costUsd: totalUsage.costUsd } : {}),
|
|
340
|
+
...(totalUsage.providerCostUsd !== undefined
|
|
341
|
+
? { providerCostUsd: totalUsage.providerCostUsd }
|
|
342
|
+
: {}),
|
|
343
|
+
...(totalUsage.veryfrontChargeUsd !== undefined
|
|
344
|
+
? { veryfrontChargeUsd: totalUsage.veryfrontChargeUsd }
|
|
345
|
+
: {}),
|
|
346
|
+
...(totalUsage.costCredits !== undefined ? { costCredits: totalUsage.costCredits } : {}),
|
|
347
|
+
...(totalUsage.costSource !== undefined ? { costSource: totalUsage.costSource } : {}),
|
|
348
|
+
...(totalUsage.usageCaptureStatus !== undefined
|
|
349
|
+
? { usageCaptureStatus: totalUsage.usageCaptureStatus }
|
|
350
|
+
: {}),
|
|
309
351
|
};
|
|
310
352
|
}
|
|
311
353
|
async function buildGenerateResultFromStream(stream) {
|
|
@@ -444,6 +486,24 @@ function normalizeStreamPart(part) {
|
|
|
444
486
|
...(usage.reasoningTokens !== undefined
|
|
445
487
|
? { reasoningTokens: usage.reasoningTokens }
|
|
446
488
|
: {}),
|
|
489
|
+
...(usage.billableInputTokens !== undefined
|
|
490
|
+
? { billableInputTokens: usage.billableInputTokens }
|
|
491
|
+
: {}),
|
|
492
|
+
...(usage.billableOutputTokens !== undefined
|
|
493
|
+
? { billableOutputTokens: usage.billableOutputTokens }
|
|
494
|
+
: {}),
|
|
495
|
+
...(usage.costUsd !== undefined ? { costUsd: usage.costUsd } : {}),
|
|
496
|
+
...(usage.providerCostUsd !== undefined
|
|
497
|
+
? { providerCostUsd: usage.providerCostUsd }
|
|
498
|
+
: {}),
|
|
499
|
+
...(usage.veryfrontChargeUsd !== undefined
|
|
500
|
+
? { veryfrontChargeUsd: usage.veryfrontChargeUsd }
|
|
501
|
+
: {}),
|
|
502
|
+
...(usage.costCredits !== undefined ? { costCredits: usage.costCredits } : {}),
|
|
503
|
+
...(usage.costSource !== undefined ? { costSource: usage.costSource } : {}),
|
|
504
|
+
...(usage.usageCaptureStatus !== undefined
|
|
505
|
+
? { usageCaptureStatus: usage.usageCaptureStatus }
|
|
506
|
+
: {}),
|
|
447
507
|
},
|
|
448
508
|
}
|
|
449
509
|
: {}),
|