-
Notifications
You must be signed in to change notification settings - Fork 839
Add reasoning text content for OpenAI Responses ChatClient Streaming #6761
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
Add reasoning text content for OpenAI Responses ChatClient Streaming #6761
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for reasoning text content during streaming responses in the OpenAI chat client. It introduces handling for reasoning summary text delta events to capture reasoning content while streaming.
- Add support for streaming reasoning text content in OpenAIResponsesChatClient
- Implement breaking-glass approach to extract delta text from reasoning events
- Add comprehensive test coverage for reasoning content streaming scenario
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
OpenAIResponsesChatClient.cs | Adds handling for reasoning summary text delta events with JSON serialization/deserialization |
OpenAIResponseClientTests.cs | Adds test case for streaming reasoning responses with detailed mock data |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs
Outdated
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIResponseClientTests.cs
Outdated
Show resolved
Hide resolved
@dotnet-policy-service agree company="Microsoft" |
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs
Outdated
Show resolved
Hide resolved
…6761) * Add reasoning text content for OpenAI Responses ChatClient Streaming --------- Co-authored-by: Stephen Toub <stoub@microsoft.com>
Motivation and Context
Add support for text reasoning content while streaming in the
OpenAIResponsesChatClient
.Microsoft Reviewers: Open in CodeFlow