You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
FinishReason and other metadata fields are null when GetStreamingChatMessageContentsAsync is invoked, but non null when GetChatMessageContentsAsync is invoked for the same payload.
To Reproduce
Steps to reproduce the behavior:
Initialize chatCompletionService.
Add some local plugins
Invoke chatCompletionService.GetStreamingChatMessageContentsAsync and chatCompletionService.GetChatMessageContentsAsync
response MetaData contains FinishReason field as null in case of GetStreamingChatMessageContentsAsync but "ToolCalls" in GetChatMessageContentsAsync which is correct expected value.
In production we are using Microsoft.SemanticKernel 1.15 and FinishReason value is tool_calls which is expected but is null after upgrade.
PromptExecutionSettings is as mentioned below: PromptExecutionSettings settings = new() { FunctionChoiceBehavior = Microsoft.SemanticKernel.FunctionChoiceBehavior.Auto(autoInvoke: false) };
Screenshots GetChatMessageContentsAsync
GetStreamingChatMessageContentsAsync
Platform
Language: c#
Source: Microsoft.SemanticKernel (any version above 1.40)
AI model: [e.g. OpenAI:GPT-4o-mini(2024-07-18)]
IDE: [e.g. Visual Studio, VS Code]
OS: [e.g. Windows, Mac]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Bug: FinishReason is null in StreamingChatMessageContent.MetaData post upgrade
.Net: Bug: FinishReason is null in StreamingChatMessageContent.MetaData post upgrade
Apr 22, 2025
ssbhavesh
changed the title
.Net: Bug: FinishReason is null in StreamingChatMessageContent.MetaData post upgrade
.Net: Bug: FinishReason, Usage is null in StreamingChatMessageContent.MetaData post upgrade
Apr 22, 2025
Describe the bug
FinishReason and other metadata fields are null when GetStreamingChatMessageContentsAsync is invoked, but non null when GetChatMessageContentsAsync is invoked for the same payload.
To Reproduce
Steps to reproduce the behavior:
PromptExecutionSettings settings = new() { FunctionChoiceBehavior = Microsoft.SemanticKernel.FunctionChoiceBehavior.Auto(autoInvoke: false) };
Screenshots

GetChatMessageContentsAsync
GetStreamingChatMessageContentsAsync
Platform
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: