Skip to content

Add usageMetadata to the LlmResponse #212

Open
@Lezeper

Description

@Lezeper

Is your feature request related to a problem? Please describe.
I need to capture token count details when constructing the LlmResponse in a custom model.

Describe the solution you'd like
Include a "usageMetadata" field in the LlmResponse.java class.

Describe alternatives you've considered
Without adding usageMetadata to LlmResponse, I’d need to use temporary storage for token counts, which negatively impacts performance.

Additional context
The Python ADK includes a usage_metadata field in its LlmResponse implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions