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
The cost meter bills Anthropic cache-write tokens at the base input rate. Anthropic publishes 1.25x base input for 5-minute cache writes and 2x for 1-hour writes, so sessions that write a lot of cache are under-counted, which is the unsafe direction for a /budget ceiling.
The engine already tracks cacheWriteTokens (src/stream.ts, src/anthropic.ts usageFor), but Pricing (src/providers.ts) has only in, out and cached, and costUsd() in src/engine.ts prices written tokens as fresh input.
Proposed: add a cacheWrite rate to Pricing and to ANTHROPIC_PRICES (1.25x input for the 5-minute cache Maat uses), carry it through setPricing / /price / the stored endpoint, and bill sessionCacheWrite at that rate in costUsd().
Raised in review of #52, which left cache writes unchanged on purpose.
Activity