Skip to content

.Net: Update Microsoft.Extensions.AI dependencies to 10.3.0 and OpenAI SDK to 2.8.0#13544

Merged
rogerbarreto merged 12 commits intomainfrom
copilot/update-ai-dependencies-version
Feb 25, 2026
Merged

.Net: Update Microsoft.Extensions.AI dependencies to 10.3.0 and OpenAI SDK to 2.8.0#13544
rogerbarreto merged 12 commits intomainfrom
copilot/update-ai-dependencies-version

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

Motivation and Context

Updates Microsoft.Extensions.AI packages to latest stable releases (10.3.0) and OpenAI SDK to 2.8.0. The new versions require transitive dependency updates and fixing breaking type renames in the OpenAI Responses API. Additionally, the new ChatOptions.Reasoning property is now mapped from PromptExecutionSettings and used in samples instead of RawRepresentationFactory.

Description

Package Updates:

  • Microsoft.Extensions.AI and Microsoft.Extensions.AI.Abstractions: 10.2.0 → 10.3.0
  • Microsoft.Extensions.AI.OpenAI: 10.0.1-preview → 10.3.0 (stable)
  • OpenAI: 2.7.0 → 2.8.0
  • Azure.AI.OpenAI: 2.7.0-beta.2 → 2.8.0-beta.1
  • Transitive dependencies → 10.0.3:
    • System.Text.Json
    • System.Numerics.Tensors
    • Microsoft.Extensions.Logging.Abstractions
    • Microsoft.Bcl.AsyncInterfaces
    • System.Threading.Channels

OpenAI 2.8.0 Breaking Changes Fixed (~23 files):

  • OpenAIResponseClientResponsesClient
  • ResponseCreationOptionsCreateResponseOptions
  • OpenAIResponseResponseResult
  • GetOpenAIResponseClient()GetResponsesClient()
  • API: Input items now passed via CreateResponseOptions.InputItems instead of separate parameter
  • API: StreamingEnabled = true required for streaming calls
  • OpenAIResponsesModelFactory removed → using public constructors in tests

ChatOptions.Reasoning Mapping:

  • Added reasoning_effortChatOptions.Reasoning.Effort mapping in PromptExecutionSettingsExtensions.ToChatOptions, supporting low, medium, high, and xhigh (→ ExtraHigh) effort levels per OpenAI API documentation
  • Replaced RawRepresentationFactory with ChatOptions.Reasoning in the OpenAI and AzureOpenAI Step02_ReasoningModel sample files
  • Updated migration documentation in .github/upgrades/prompts/SemanticKernelToAgentFramework.md to use TruncationMode as the provider-specific options example (since reasoning now has a direct ChatOptions equivalent)

Contribution Checklist


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ions

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Microsoft.Extensions.AI dependencies to latest versions Update Microsoft.Extensions.AI dependencies to 10.3.0 Feb 12, 2026
Copilot AI requested a review from stephentoub February 12, 2026 15:24
@stephentoub
Copy link
Member

ChatOptions.Reasoning:
Does not exist in Microsoft.Extensions.AI 10.3.0

@copilot, yes, it does

@stephentoub
Copy link
Member

@copilot, OpenAI and Azure.AI.OpenAI should also both be updated to the latest versions on nuget, e.g. 2.8.0

Copilot AI and others added 4 commits February 12, 2026 15:50
…→ResponsesClient, OpenAIResponse→ResponseResult, ResponseCreationOptions→CreateResponseOptions, GetOpenAIResponseClient→GetResponsesClient

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
…type renames

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
…ionFactory in samples

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
…onseOptions

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 12, 2026

ChatOptions.Reasoning:
Does not exist in Microsoft.Extensions.AI 10.3.0

...

You're right, ChatOptions.Reasoning does exist in 10.3.0 with ReasoningOptions containing Effort (enum: None, Low, Medium, High, ExtraHigh) and Output (enum: None, Summary, Full). I've now:

  1. Updated M.E.AI.OpenAI to 10.3.0 (stable) and OpenAI SDK to 2.8.0 (with all breaking type renames fixed)
  2. Added reasoning_effortChatOptions.Reasoning.Effort mapping in ToChatOptions (bcbc24f)
  3. Replaced RawRepresentationFactory with ChatOptions.Reasoning in the sample files (bcbc24f)

Copilot AI changed the title Update Microsoft.Extensions.AI dependencies to 10.3.0 Update Microsoft.Extensions.AI dependencies to 10.3.0 and OpenAI SDK to 2.8.0 Feb 12, 2026
Copilot AI requested a review from stephentoub February 12, 2026 16:17
@moonbox3 moonbox3 added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel kernel.core labels Feb 12, 2026
@github-actions github-actions bot changed the title Update Microsoft.Extensions.AI dependencies to 10.3.0 and OpenAI SDK to 2.8.0 .Net: Update Microsoft.Extensions.AI dependencies to 10.3.0 and OpenAI SDK to 2.8.0 Feb 12, 2026
@stephentoub stephentoub marked this pull request as ready for review February 12, 2026 16:25
@stephentoub stephentoub requested a review from a team as a code owner February 12, 2026 16:25
Copy link
Contributor Author

Copilot AI commented Feb 12, 2026

@copilot, OpenAI and Azure.AI.OpenAI should also both be updated to the latest versions on nuget, e.g. 2.8.0

Already fixed in 8da1546OpenAI is at 2.8.0 and Azure.AI.OpenAI is at 2.8.0-beta.1 (latest on NuGet).

… option

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
@rogerbarreto rogerbarreto added this pull request to the merge queue Feb 13, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 13, 2026
…I SDK to 2.8.0 (#13544)

### Motivation and Context

Updates Microsoft.Extensions.AI packages to latest stable releases
(10.3.0) and OpenAI SDK to 2.8.0. The new versions require transitive
dependency updates and fixing breaking type renames in the OpenAI
Responses API. Additionally, the new `ChatOptions.Reasoning` property is
now mapped from `PromptExecutionSettings` and used in samples instead of
`RawRepresentationFactory`.

### Description

**Package Updates:**
- `Microsoft.Extensions.AI` and `Microsoft.Extensions.AI.Abstractions`:
10.2.0 → 10.3.0
- `Microsoft.Extensions.AI.OpenAI`: 10.0.1-preview → 10.3.0 (stable)
- `OpenAI`: 2.7.0 → 2.8.0
- `Azure.AI.OpenAI`: 2.7.0-beta.2 → 2.8.0-beta.1
- Transitive dependencies → 10.0.3:
  - `System.Text.Json`
  - `System.Numerics.Tensors`
  - `Microsoft.Extensions.Logging.Abstractions`
  - `Microsoft.Bcl.AsyncInterfaces`
  - `System.Threading.Channels`

**OpenAI 2.8.0 Breaking Changes Fixed (~23 files):**
- `OpenAIResponseClient` → `ResponsesClient`
- `ResponseCreationOptions` → `CreateResponseOptions`
- `OpenAIResponse` → `ResponseResult`
- `GetOpenAIResponseClient()` → `GetResponsesClient()`
- API: Input items now passed via `CreateResponseOptions.InputItems`
instead of separate parameter
- API: `StreamingEnabled = true` required for streaming calls
- `OpenAIResponsesModelFactory` removed → using public constructors in
tests

**ChatOptions.Reasoning Mapping:**
- Added `reasoning_effort` → `ChatOptions.Reasoning.Effort` mapping in
`PromptExecutionSettingsExtensions.ToChatOptions`, supporting `low`,
`medium`, `high`, and `xhigh` (→ ExtraHigh) effort levels per OpenAI API
documentation
- Replaced `RawRepresentationFactory` with `ChatOptions.Reasoning` in
the OpenAI and AzureOpenAI Step02_ReasoningModel sample files
- Updated migration documentation in
`.github/upgrades/prompts/SemanticKernelToAgentFramework.md` to use
`TruncationMode` as the provider-specific options example (since
reasoning now has a direct `ChatOptions` equivalent)

### Contribution Checklist

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 13, 2026
@markwallace-microsoft markwallace-microsoft added this pull request to the merge queue Feb 13, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 13, 2026
rogerbarreto and others added 2 commits February 25, 2026 11:43
OpenAI SDK 2.8.0 no longer throws ArgumentException client-side when
CreateResponseOptions has empty InputItems and no PreviousResponseId.
Instead, the request is sent and the server returns HTTP 400
ClientResultException.

Add early validation in ResponseThreadActions.InvokeAsync and
InvokeStreamingAsync to throw ArgumentException before making the API
call, preserving the expected behavior for callers.

Fixes integration tests:
- OpenAIResponseAgentInvokeTests.InvokeWithoutMessageCreatesThreadAsync
- OpenAIResponseAgentInvokeStreamingTests.InvokeStreamingAsyncWithoutMessageCreatesThreadAsync

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
OpenAI SDK 2.8.0 no longer validates empty InputItems client-side.
The request now reaches the server which returns HTTP 400
ClientResultException instead of a local ArgumentException.

Update tests to expect ClientResultException, staying permissive
with what the SDK allows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rogerbarreto rogerbarreto added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit 889807d Feb 25, 2026
18 checks passed
@rogerbarreto rogerbarreto deleted the copilot/update-ai-dependencies-version branch February 25, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel.core kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants