Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the OpenAI integration layer and tests to align with OpenAI SDK 2.10.0 behaviors, adding coverage for newly supported streaming payloads and additional response item types.
Changes:
- Add streaming TTS support (audio deltas + usage) and corresponding unit/integration tests.
- Surface streaming transcription segment timing metadata + usage, with unit test coverage.
- Update Responses client mapping/tests for new tool item types (apply_patch) and updated web_search source schema.
Show a summary per file
| File | Description |
|---|---|
| test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAITextToSpeechClientTests.cs | Adds unit test validating streaming TTS yields multiple chunks and usage. |
| test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAITextToSpeechClientIntegrationTests.cs | Adds integration test for streaming TTS updates + usage. |
| test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAISpeechToTextClientTests.cs | Adds unit test validating streaming transcription segment timing + usage mapping. |
| test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIResponseClientTests.cs | Adds apply_patch tool test and updates web_search fixtures/assertions for new schema. |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAITextToSpeechClient.cs | Implements streaming TTS via SDK streaming API with fallback to non-streaming. |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAISpeechToTextClient.cs | Adds transcription usage mapping and segment timing support in streaming. |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs | Adds apply_patch item mapping; updates web_search parsing; adjusts image/file input handling. |
Copilot's findings
- Files reviewed: 8/8 changed files
- Comments generated: 2
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs
Outdated
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAITextToSpeechClientIntegrationTests.cs
Show resolved
Hide resolved
- Use OpenAIClientExtensions.ImageUriToMediaType() when converting InputImageUri to UriContent, so a more specific media type (e.g. image/png) is inferred from the URL when possible, falling back to image/* otherwise. - Source the streaming TTS model from TestRunnerConfiguration instead of hard-coding gpt-4o-mini-tts in the integration test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jozkee
approved these changes
Apr 6, 2026
test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIResponseClientTests.cs
Outdated
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIResponseClientTests.cs
Show resolved
Hide resolved
rogerbarreto
reviewed
Apr 6, 2026
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs
Outdated
Show resolved
Hide resolved
rogerbarreto
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Microsoft Reviewers: Open in CodeFlow