You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: reduce alert noise and add actionable cost driver diagnosis
- Disable cycle outlier detection by default (cycleOutlierMultiplier=0)
since it just flags active users against an inactive team median
- Add cost driver breakdown to daily spike and cost/req alerts showing
thinking % and max-mode % with dollar amounts
- Remove useless "500 premium reqs" from alert messages (legacy field,
same for everyone)
- Separate cycle_spend metric from daily spend to prevent dedup collision
- Add spend legend and blue color to user detail chart tooltip
Made-with: Cursor
message: `${user.name}: daily spend spiked to $${todayDollars} (${ratio.toFixed(1)}x their ${lookbackDays}-day avg of $${avgDollars}), model: ${user.most_used_model||"unknown"}`,
90
+
message: `${user.name}: daily spend spiked to $${todayDollars} (${ratio.toFixed(1)}x their ${lookbackDays}-day avg of $${avgDollars}), model: ${user.most_used_model||"unknown"}${driverNote}`,
69
91
detectedAt: now,
70
92
resolvedAt: null,
71
93
alertedAt: null,
@@ -97,10 +119,10 @@ function detectCycleOutliers(anomalies: Anomaly[], now: string, outlierMultiplie
message: `${user.name}: cycle spend $${userDollars} is ${ratio.toFixed(1)}x the team median ($${medianDollars}), model: ${user.most_used_model||"unknown"}, ${user.fast_premium_requests} premium reqs`,
125
+
message: `${user.name}: cycle spend $${userDollars} is ${ratio.toFixed(1)}x the team median ($${medianDollars}), model: ${user.most_used_model||"unknown"}`,
104
126
detectedAt: now,
105
127
resolvedAt: null,
106
128
alertedAt: null,
@@ -136,9 +158,7 @@ function detectCostPerReqSpikes(
message: `${user.name}: cost/request spiked to $${todayCpr}/req (${ratio.toFixed(1)}x their avg of $${histCpr}/req), using ${user.today_top_model||"unknown"}${maxModeNote}, $${todaySpend} total today across ${user.today_reqs} reqs`,
170
+
message: `${user.name}: cost/request spiked to $${todayCpr}/req (${ratio.toFixed(1)}x their avg of $${histCpr}/req), using ${user.today_top_model||"unknown"}, $${todaySpend} total today across ${user.today_reqs} reqs${driverNote}`,
0 commit comments