Skip to content

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Jul 19, 2025

  • Exposes the conversion routines for converting OpenAI output responses
  • Moves the extensions into the namespace most relevant to the performed operation
Microsoft Reviewers: Open in CodeFlow

- Exposes the conversion routines for converting OpenAI output responses
- Moves the extensions into the namespace most relevant to the performed operation
@stephentoub stephentoub requested a review from a team as a code owner July 19, 2025 03:44
@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Jul 19, 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 exposes additional chat model conversion helpers by refactoring extension methods and moving them to more appropriate namespaces. The changes improve API organization by placing conversion extensions within the OpenAI namespaces most relevant to each specific operation.

  • Moves conversion extension methods from OpenAIClientExtensions to namespace-specific extension classes
  • Exposes internal conversion methods to support the new public extension methods
  • Fixes class naming inconsistencies (e.g., OpenAIAssistantChatClientOpenAIAssistantsChatClient)

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
OpenAIClientExtensions.cs Removes conversion extension methods and updates class references
MicrosoftExtensionsAIChatExtensions.cs New extension class for OpenAI.Chat namespace conversions
MicrosoftExtensionsAIAssistantsExtensions.cs New extension class for OpenAI.Assistants namespace conversions
MicrosoftExtensionsAIResponsesExtensions.cs New extension class for OpenAI.Responses namespace conversions
MicrosoftExtensionsAIRealtimeExtensions.cs New extension class for OpenAI.Realtime namespace conversions
OpenAIChatClient.cs Exposes internal conversion method and removes unnecessary condition
OpenAIResponsesChatClient.cs Fixes class name and exposes internal conversion method
OpenAIAssistantsChatClient.cs Fixes class name and adds new constructor overload
Comments suppressed due to low confidence (1)

src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs:26

  • [nitpick] The class name change from 'OpenAIResponseChatClient' to 'OpenAIResponsesChatClient' adds an 's' but this doesn't align with the namespace 'OpenAI.Responses'. Consider 'OpenAIResponseChatClient' to match the singular form used in other similar class names in the codebase.
internal sealed class OpenAIResponsesChatClient : IChatClient

@jeffhandley jeffhandley merged commit b8012f4 into dotnet:main Jul 19, 2025
7 checks passed
This was referenced Aug 13, 2025
This was referenced Aug 15, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 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.

2 participants