Open History to see the last commit
1---
2id: UsageInfo
3title: UsageInfo
4---
5
6Defined in: [packages/ai/src/activities/chat/middleware/types.ts:498](https://github.com/TanStack/ai/blob/main/packages/ai/src/activities/chat/middleware/types.ts#L498)
7
8Token usage statistics passed to the onUsage hook.
9Extracted from the RUN_FINISHED chunk when usage data is present.
10
11Includes optional provider-reported `cost`/`costDetails` (see TokenUsage).
12Kept as an interface extending `TokenUsage` to preserve declaration merging for
13this publicly exported type.
14
15## Extends
16
17- `TokenUsage`