Legacy event recorder. Used by ``costHook.apply_cost_hook``.
(self, label: str, units: int)
| 96 | last_usage: dict[str, Any] | None = None |
| 97 | |
| 98 | def record(self, label: str, units: int) -> None: |
| 99 | """Legacy event recorder. Used by ``costHook.apply_cost_hook``.""" |
| 100 | self.total_units += units |
| 101 | self.events.append(f"{label}:{units}") |
| 102 | |
| 103 | def record_usage(self, model: str, usage: dict[str, Any]) -> float: |
| 104 | """Record a real API usage event into the bootstrap singleton. |