@ekkos/cli 1.5.0 → 1.5.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.
|
@@ -599,7 +599,8 @@ function buildDashboardData(params) {
|
|
|
599
599
|
model: params.model,
|
|
600
600
|
turnCount: turns.length,
|
|
601
601
|
totalCost,
|
|
602
|
-
|
|
602
|
+
// Unique content tokens: excludes cache_read (same prefix re-billed per turn)
|
|
603
|
+
totalTokens: totalInput + totalCacheCreate + totalOutput,
|
|
603
604
|
totalInput,
|
|
604
605
|
totalCacheRead,
|
|
605
606
|
totalCacheCreate,
|
|
@@ -1915,7 +1916,12 @@ async function launchDashboard(initialSessionName, initialJsonlPath, refreshMs,
|
|
|
1915
1916
|
if (!d)
|
|
1916
1917
|
return;
|
|
1917
1918
|
try {
|
|
1918
|
-
|
|
1919
|
+
// Show unique content tokens: output (model-generated) + cache_create (new content cached)
|
|
1920
|
+
// + uncached input. Excludes cache_read (same prefix re-billed each turn — NOT unique content).
|
|
1921
|
+
// Previously showed cumulative API total (input+read+create+output) which inflated by ~10-20x
|
|
1922
|
+
// because the same prefix was counted on every tool round-trip.
|
|
1923
|
+
const uniqueTokens = d.totalOutput + d.totalCacheCreate + d.totalInput;
|
|
1924
|
+
const totalTokensM = (uniqueTokens / 1000000).toFixed(2);
|
|
1919
1925
|
const totalSavings = d.turns.reduce((s, t) => s + t.savings, 0);
|
|
1920
1926
|
// Model routing breakdown (uses routedModel for actual model counts)
|
|
1921
1927
|
const opusCount = d.turns.filter(t => t.routedModel.includes('opus')).length;
|
package/package.json
CHANGED