Skip to content

Conversation

@mdemoret-nv
Copy link
Collaborator

Description

When using any of our agents and the OpenAI provider, token metrics are not reported to telemetry providers because the option stream_usage defaults to False in the OpenChatModel object.

This sets the default to be True, but leaves the option for users to override it as false with extra parameters.

Overhead should be minimal.

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

…d adding stream_usage option for metadata in streaming responses.

Signed-off-by: Michael Demoret <[email protected]>
…m_usage` in the config

Signed-off-by: Michael Demoret <[email protected]>
@mdemoret-nv mdemoret-nv added bug Something isn't working non-breaking Non-breaking change labels May 30, 2025
@mdemoret-nv
Copy link
Collaborator Author

/merge

@rapids-bot rapids-bot bot merged commit 792edb3 into NVIDIA:develop Jun 10, 2025
12 checks passed
AnuradhaKaruppiah pushed a commit to AnuradhaKaruppiah/oss-agentiq that referenced this pull request Aug 4, 2025
When using any of our agents and the OpenAI provider, token metrics are not reported to telemetry providers because the option `stream_usage` defaults to False in the OpenChatModel object.

This sets the default to be `True`, but leaves the option for users to override it as false with extra parameters.

Overhead should be minimal.

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AIQToolkit/blob/develop/docs/source/resources/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - Michael Demoret (https://github.com/mdemoret-nv)

Approvers:
  - Yuchen Zhang (https://github.com/yczhang-nv)

URL: NVIDIA#328
scheckerNV pushed a commit to scheckerNV/aiq-factory-reset that referenced this pull request Aug 22, 2025
When using any of our agents and the OpenAI provider, token metrics are not reported to telemetry providers because the option `stream_usage` defaults to False in the OpenChatModel object.

This sets the default to be `True`, but leaves the option for users to override it as false with extra parameters.

Overhead should be minimal.

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AIQToolkit/blob/develop/docs/source/resources/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - Michael Demoret (https://github.com/mdemoret-nv)

Approvers:
  - Yuchen Zhang (https://github.com/yczhang-nv)

URL: NVIDIA#328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants