Skip to content

[v5 and v4 ] StreamText does not have raw usage #6702

Closed
@zhihengGet

Description

@zhihengGet

Description

generateText have usageMetadata but streamText does not, i need it for gemini models, i would like to have the usageMetadata in response.body . generateText seem to have it

rawResponse: { headers: responseHeaders, body: rawResponse },

howeer, streamText does not have it :( for both v5 and ai@latest , i know v5 included more token type in the usage field but i want to access token count details audio..etc

AI SDK Version

ai@alpha and ai@latest

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions