AI SDK 7 Changed usage. Your Token Counts Are Now Wrong

result.usage moved from final-step-only tokens to a running total across all steps; final-step data is now under result.finalStep.usage.

toolCalls, toolResults, content, files, sources, and warnings at the top level changed the same way.

Nothing throws an error. Dashboards, budget alerts, and per-request cost logs built on the old shape silently report the wrong numbers.

Read the full post

Read the full post