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
{{ message }}
Repository navigation
feat: per-provider cost tracking with drain/reset for periodic reporting #4
AEGIS v1.70.0 added a CostTracker to its resilience module that accumulates per-provider costs (input/output tokens, request count, total cost). The standalone llm-providers package has a CostTracker in utils/cost-tracker.ts but it's more complex and less edge-friendly.
Token-level tracking — inputTokens and outputTokens per provider, not just cost
Edge-friendly — no dependencies beyond what CF Workers supports
The existing CostTracker has cost optimization and weighted scoring that's useful but the basic accumulation + drain pattern is what AEGIS needs for parity.
Reference
aegis-daemon/web/src/kernel/resilience.ts — CostTracker class and ProviderCostEntry interface.
Activity
feat: graduated circuit breaker, cost tracking drain, Workers AI tool…
stackbilt-admin commentedon Mar 30, 2026
Shipped in 99b5220. drain() method, token-level tracking (inputTokens/outputTokens), ProviderCostEntry interface.
feat: graduated circuit breaker, cost tracking drain, Workers AI tool…