Skip to content

AmazonBedrockGenerator does not normalize token usage into meta #3246

@mathislucka

Description

@mathislucka

Describe the bug
Other generators normalize token usage (input/output tokens) into meta.

In non-streaming mode, tokens can be accessed from raw meta[ResponseMetadata].

In streaming node, token usage is discarded and not accessible.

To Reproduce
Run a request against an Anthropic model with AmazonBedrockGenerator.

Describe your environment (please complete the following information):

  • OS: [e.g. iOS]
  • Haystack version:
  • Integration version:

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions