Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: After upgrading to v1.38, token usage information isn't returned anymore for Streaming Chat completion #10636

Open
marcominerva opened this issue Feb 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@marcominerva
Copy link

marcominerva commented Feb 21, 2025

Describe the bug
After upgrading Semantic Kernel to v1.38, when I call IChatCompletionService.GetStreamingChatMessageContentsAsync, the last StreamingChatMessageContent does not contain token usage information anymore. If I revert back to v1.37, the information is correctly returned as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Update Semantic Kernel to v1.38
  2. Request a chat completion using IChatCompletionService.GetStreamingChatMessageContentsAsync
  3. Inspect the last StreamingChatMessageContent object that is returned
  4. Usage property is null

Expected behavior
Token usage information should be returned in a consistent way in both Semantic Kernel v1.37 and v1.38.

Platform

  • Language: C#
  • Source: NuGet package version 1.38
  • AI model: Azure OpenAI: GPT-4o-mini (2024-07-18)
  • IDE: Visual Studio 2022 17.13.1
  • OS: Windows 11
@marcominerva marcominerva added the bug Something isn't working label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant