Used tokens across all models (input + output only). This is the number that should be displayed as the headline "Tokens" metric — it matches what the user sees in OpenCode and represents actual computation, not cached context.
(&self)
| 272 | /// metric — it matches what the user sees in OpenCode and represents |
| 273 | /// actual computation, not cached context. |
| 274 | pub fn used_tokens(&self) -> u64 { |
| 275 | self.models.iter().map(|m| m.used_tokens()).sum() |
| 276 | } |
| 277 | |
| 278 | /// Cache tokens across all models (cache read + cache write). |
| 279 | pub fn cache_tokens(&self) -> u64 { |