Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Expose additional chat model conversion helpers - #6629

#6629
Merged
jeffhandley merged 1 commit into
dotnet:maindotnet/extensions:mainfrom
stephentoub:moreconversionsstephentoub/extensions:moreconversionsCopy head branch name to clipboard
Jul 19, 2025
Merged

Expose additional chat model conversion helpers#6629
jeffhandley merged 1 commit into
dotnet:maindotnet/extensions:mainfrom
stephentoub:moreconversionsstephentoub/extensions:moreconversionsCopy head branch name to clipboard

Conversation

@stephentoub

@stephentoub stephentoub commented Jul 19, 2025

Copy link
Copy Markdown
Member
  • 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIChatClient.cs
Comment thread src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIChatClient.cs
@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
@stephentoub
stephentoub deleted the moreconversions branch December 12, 2025 23:01
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.