Expand description
Session-level cost tracking for LLM API usage.
Uses ModelInfo pricing ($ per million tokens) to compute cost from the usage dict returned by each LLM API call.
Ported from opendev/core/runtime/cost_tracker.py.
Structsยง
- Cost
Tracker - Tracks cumulative token usage and estimated cost for a session.
- Pricing
Info - Pricing info needed for cost computation.
- Token
Usage - Token usage from a single LLM call.