mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
### 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] <[email protected]> Co-authored-by: stephentoub <[email protected]> Co-authored-by: Roger Barreto <[email protected]> Co-authored-by: Copilot <[email protected]>