Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

UsageInfo.md

19 lines564 Bytes

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