fix: read usage from finish chunk's totalUsage instead of custom usage event (#670)
The previous approach awaited result.totalUsage after stream ends and yielded a custom 'usage' chunk. This is unnecessary since the AI SDK's finish event already carries totalUsage. Read it directly in the stream-chunk-processor and remove the custom usage event plumbing. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Z
Zeng Xian committed
36b7f9da58afdc389ed4cf8f552575d4d7f94df9
Parent: c319663