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

UsageInfo.md

17 lines439 Bytes

1---
2id: UsageInfo
3title: UsageInfo
4---
5​
6Defined in: packages/ai/src/activities/chat/middleware/types.ts:553
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`