@agent-inspect/eval 6.31.40 → 6.31.41
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 +17 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +18 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1429,7 +1429,8 @@ async function evalRun(input, options = {}) {
|
|
|
1429
1429
|
format: resolved.read.format,
|
|
1430
1430
|
run: selected.run,
|
|
1431
1431
|
nodes: flatten(selected.run.children),
|
|
1432
|
-
events: resolved.read.events.filter((event) => event.runId === selected.run?.runId)
|
|
1432
|
+
events: resolved.read.events.filter((event) => event.runId === selected.run?.runId),
|
|
1433
|
+
readerWarnings: resolved.read.warnings
|
|
1433
1434
|
};
|
|
1434
1435
|
const diagnostics = [];
|
|
1435
1436
|
const findings = [];
|
|
@@ -1774,6 +1775,21 @@ var checks = {
|
|
|
1774
1775
|
return createRule("eval.maxTotalTokens", "llm", (context) => {
|
|
1775
1776
|
const llms = llmEventsForTokenBudget(context.events);
|
|
1776
1777
|
const findings = [];
|
|
1778
|
+
if (context.readerWarnings.some(readers.isTraceEvidenceDiscardWarning)) {
|
|
1779
|
+
findings.push(
|
|
1780
|
+
fail2(
|
|
1781
|
+
"eval.maxTotalTokens",
|
|
1782
|
+
`Unverifiable total token budget: malformed or invalid trace evidence was discarded while reading, so the total token limit cannot be verified.`,
|
|
1783
|
+
evidenceForRun(context.run, "tokenUsage.total"),
|
|
1784
|
+
"complete measurable total token evidence with no discarded rows",
|
|
1785
|
+
{
|
|
1786
|
+
reason: "unverifiable",
|
|
1787
|
+
discardedEvidence: true,
|
|
1788
|
+
calls: llms.length
|
|
1789
|
+
}
|
|
1790
|
+
)
|
|
1791
|
+
);
|
|
1792
|
+
}
|
|
1777
1793
|
const missing = llms.filter((event) => measuredTotalTokens(event) === void 0);
|
|
1778
1794
|
if (missing.length > 0) {
|
|
1779
1795
|
const errored = missing.filter((event) => event.status === "error");
|