@blockrun/clawrouter 0.8.10 → 0.8.11

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/cli.js CHANGED
@@ -1791,6 +1791,12 @@ async function getStats(days = 7) {
1791
1791
  }
1792
1792
  const totalSavings = totalBaselineCost - totalCost;
1793
1793
  const savingsPercentage = totalBaselineCost > 0 ? totalSavings / totalBaselineCost * 100 : 0;
1794
+ let entriesWithBaseline = 0;
1795
+ for (const day of dailyBreakdown) {
1796
+ if (day.totalBaselineCost !== day.totalCost) {
1797
+ entriesWithBaseline += day.totalRequests;
1798
+ }
1799
+ }
1794
1800
  return {
1795
1801
  period: days === 1 ? "today" : `last ${days} days`,
1796
1802
  totalRequests,
@@ -1802,8 +1808,10 @@ async function getStats(days = 7) {
1802
1808
  avgCostPerRequest: totalRequests > 0 ? totalCost / totalRequests : 0,
1803
1809
  byTier: byTierWithPercentage,
1804
1810
  byModel: byModelWithPercentage,
1805
- dailyBreakdown: dailyBreakdown.reverse()
1811
+ dailyBreakdown: dailyBreakdown.reverse(),
1806
1812
  // Oldest first for charts
1813
+ entriesWithBaseline
1814
+ // How many entries have valid baseline tracking
1807
1815
  };
1808
1816
  }
1809
1817