Skip to main content

Module cost

Module cost 

Source
Expand description

Cost tracking โ€” token counting and billing for LLM calls Phase 4 feature: Production billing support

Structsยง

CostRecord
Cost record for a single LLM call
CostSummary
CostTracker
Cost tracker (in-memory + persistent accounting hooks)
ModelCost
Cost per 1M tokens (input/output separate)
RateLimitStatus
Claude API rate limit status (from response headers)
TokenUsage
Token usage for a call