Skip to content

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Sep 24, 2025

Microsoft Reviewers: Open in CodeFlow

@stephentoub stephentoub requested review from a team as code owners September 24, 2025 02:40
@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 02:40
@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Sep 24, 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

Updates the OpenAI package dependency from version 2.4.0 to 2.5.0 across the Microsoft.Extensions.AI.OpenAI library and tests, incorporating new API features and fixes.

  • Updated OpenAI package version to 2.5.0
  • Refactored code to use new OpenAI 2.5.0 APIs, removing reflection-based workarounds
  • Added user agent header validation tests to ensure proper library identification

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
eng/packages/General.props Updates OpenAI package version from 2.4.0 to 2.5.0
src/Libraries/Microsoft.Extensions.AI.OpenAI/CHANGELOG.md Documents the OpenAI version update
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponsesChatClient.cs Uses new public Model property and updated API methods
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIEmbeddingGenerator.cs Adds reflection-based workaround for RequestOptions support
test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/ThrowUserAgentExceptionHandler.cs New test helper to validate user agent headers
test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIResponseClientTests.cs Adds user agent validation test and updates method signature
test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIEmbeddingGeneratorTests.cs Adds user agent validation test and refactors helper method
test/Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIChatClientTests.cs Adds user agent validation test

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@stephentoub stephentoub merged commit d649cbb into dotnet:main Sep 24, 2025
7 checks passed
@stephentoub stephentoub deleted the updateopenai25 branch September 24, 2025 12:09
jeffhandley pushed a commit that referenced this pull request Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ai Microsoft.Extensions.AI libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants