Usage is a token tally summed across a session's assistant turns.
| 29 | |
| 30 | // Usage is a token tally summed across a session's assistant turns. |
| 31 | type Usage struct { |
| 32 | Input int64 `json:"input"` |
| 33 | Output int64 `json:"output"` |
| 34 | CacheCreation int64 `json:"cache_creation"` |
| 35 | CacheRead int64 `json:"cache_read"` |
| 36 | } |
| 37 | |
| 38 | // Total is all tokens flow-managed sessions actually processed. |
| 39 | func (u Usage) Total() int64 { return u.Input + u.Output + u.CacheCreation + u.CacheRead } |
nothing calls this directly
no outgoing calls
no test coverage detected