Upgrade NuGet dependencies to latest compatible versions#1120
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades several centrally-managed NuGet dependencies (notably Semantic Kernel / MCP-related packages) and updates AIChatService to the newer OpenAI Responses SDK API surface to keep the chat implementation compatible with the upgraded dependency graph.
Changes:
- Upgraded multiple NuGet package versions in
Directory.Packages.props(Semantic Kernel, MCP, resilience, NuGet.* pins, etc.). - Migrated
AIChatServicefrom the prior Responses client/options types toResponsesClient+CreateResponseOptions. - Updated streaming/non-streaming response creation to populate
InputItemson options before calling the SDK.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| EssentialCSharp.Chat.Shared/Services/AIChatService.cs | Migrates chat response creation to the updated OpenAI Responses SDK types and request shape. |
| Directory.Packages.props | Updates centrally-managed package versions used across the solution. |
Bumps the following packages to their latest stable/preview releases: - Microsoft.SemanticKernel: 1.72.0 -> 1.76.0 - Microsoft.Extensions.Http.Resilience: 10.5.0 -> 10.6.0 - NuGet.Packaging/NuGet.Protocol: 7.3.1 -> 7.6.0 - ModelContextProtocol*: 1.2.0 -> 1.3.0 - Microsoft.SemanticKernel.Connectors.PgVector: 1.72.0-preview -> 1.74.0-preview - System.CommandLine: 2.0.7 -> 2.0.8 - Microsoft.SourceLink.GitHub: 10.0.203 -> 10.0.300 - Azure.Monitor.OpenTelemetry.Profiler: 1.0.0-beta9 -> 1.0.1-beta.1 **Breaking Changes in OpenAI SDK:** The upgrade pulls OpenAI 2.10.0 (via Semantic Kernel 1.76.0) which deprecates the old Responses API. Migrated AIChatService from: - OpenAIResponseClient -> ResponsesClient - ResponseCreationOptions -> CreateResponseOptions Updated method invocations to use new signature where InputItems is populated directly on the options object rather than passed as separate arguments. All chat service tests pass; build succeeds.
ede01da to
d98acf4
Compare
- Set options.Model = _Options.ChatDeploymentName in CreateResponseOptionsAsync so the configured deployment is actually forwarded on every request. GetResponsesClient() has no string overload in the installed SDK, so the model must be set on CreateResponseOptions instead. - Update endUserId XML doc in GetChatCompletion and GetChatCompletionStream from 'Currently reserved for forwarding' to accurately state the value IS forwarded via CreateResponseOptions.EndUserId.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
EssentialCSharp.Chat.Shared/Services/AIChatService.cs:552
- CloneOptionsWithPreviousResponseId() doesn’t copy the configured model/deployment name. Since CreateResponseOptionsAsync sets options.Model = _Options.ChatDeploymentName, the cloned continuationOptions will have Model unset, which can cause tool-call continuation requests (and streaming continuations) to fail at runtime. Copy source.Model into the clone as well (and keep it consistent with the initial request).
var clone = new CreateResponseOptions
{
Instructions = source.Instructions,
PreviousResponseId = previousResponseId,
EndUserId = source.EndUserId,
ReasoningOptions = source.ReasoningOptions,
MaxOutputTokenCount = source.MaxOutputTokenCount,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Updates all production NuGet dependencies to their latest stable and preview releases. This captures recent improvements, features, and security updates across the dependency tree while maintaining compatibility with .NET 10.0 and the existing codebase.
Changes
Notable Dependency Updates
Breaking Changes & Mitigation
OpenAI SDK 2.10.0 (pulled via Semantic Kernel 1.76.0) deprecates the old Responses API. Migrated
AIChatServicefrom:OpenAIResponseClient→ResponsesClientResponseCreationOptions→CreateResponseOptionsUpdated method invocations to populate
InputItemsdirectly on options rather than as separate arguments. This maintains full feature parity while using the current SDK surface.Verification