





















@@ -1117,13 +1117,15 @@ async function scanTranscriptFile(params: {
11171117entry.costBreakdown = undefined;
11181118} else if (
11191119!isModelPricingKnown(cost) &&
1120+(entry.costTotal === undefined || entry.costTotal === 0) &&
11201121computeUsageTokenTotals(entry.usage).totalTokens > 0
11211122) {
1122-// Pricing for this model is unknown (no positive per-token rate). Any cost the
1123-// transport recorded is a fabricated $0 derived from an all-zero catalog entry,
1124-// not a real price. Drop it and surface the turn as a missing-cost entry so the
1125-// tokens it burned are not reported as confident $0 spend — otherwise every
1126-// budget/spike safeguard that reads totalCost stays blind to it.
1123+// Pricing for this model is unknown (no positive per-token rate) and there is no
1124+// trustworthy recorded cost — the transport either recorded nothing or a
1125+// fabricated $0 derived from an all-zero catalog entry. Surface this token-burning
1126+// turn as a missing-cost entry instead of recording a confident $0, so budget and
1127+// spike safeguards that read totalCost are not left blind to it. A turn that
1128+// carries a real positive recorded cost is preserved by the guard above.
11271129entry.costTotal = undefined;
11281130entry.costBreakdown = undefined;
11291131} else if (entry.costTotal === undefined) {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。