Skip to content

Conversation

rogerbarreto
Copy link
Contributor

@rogerbarreto rogerbarreto commented Sep 1, 2025

Motivation and Context

Add support for text reasoning content while streaming in the OpenAIResponsesChatClient.

Microsoft Reviewers: Open in CodeFlow

@Copilot Copilot AI review requested due to automatic review settings September 1, 2025 20:45
@rogerbarreto rogerbarreto requested a review from a team as a code owner September 1, 2025 20:45
@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Sep 1, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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.

@rogerbarreto
Copy link
Contributor Author

@dotnet-policy-service agree company="Microsoft"

@stephentoub stephentoub enabled auto-merge (squash) September 5, 2025 01:51
@stephentoub stephentoub merged commit 06ad449 into dotnet:main Sep 5, 2025
6 checks passed
joperezr pushed a commit that referenced this pull request Sep 9, 2025
…6761)

* Add reasoning text content for OpenAI Responses ChatClient Streaming

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-ai Microsoft.Extensions.AI libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants