Skip to content

Upgrade NuGet dependencies to latest compatible versions#1120

Merged
BenjaminMichaelis merged 2 commits into
mainfrom
benjaminmichaelis/upgrade-nuget
May 17, 2026
Merged

Upgrade NuGet dependencies to latest compatible versions#1120
BenjaminMichaelis merged 2 commits into
mainfrom
benjaminmichaelis/upgrade-nuget

Conversation

@BenjaminMichaelis
Copy link
Copy Markdown
Member

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

  • Directory.Packages.props: Bumped 8 packages to latest compatible versions
  • EssentialCSharp.Chat.Shared/Services/AIChatService.cs: Migrated to OpenAI SDK 2.10.0 API surface

Notable Dependency Updates

  • Semantic Kernel: 1.72.0 → 1.76.0 (multiple features and fixes)
  • ModelContextProtocol: 1.2.0 → 1.3.0
  • Microsoft.Extensions.Http.Resilience: 10.5.0 → 10.6.0
  • NuGet.Packaging/Protocol: 7.3.1 → 7.6.0
  • Other: System.CommandLine, SourceLink, OpenTelemetry Profiler minor/patch versions

Breaking Changes & Mitigation

OpenAI SDK 2.10.0 (pulled via Semantic Kernel 1.76.0) deprecates the old Responses API. Migrated AIChatService from:

  • OpenAIResponseClientResponsesClient
  • ResponseCreationOptionsCreateResponseOptions

Updated method invocations to populate InputItems directly on options rather than as separate arguments. This maintains full feature parity while using the current SDK surface.

Verification

  • Chat service tests pass (EssentialCSharp.Chat.Tests)
  • Solution builds successfully
  • No runtime or integration test failures observed

Copilot AI review requested due to automatic review settings May 17, 2026 04:35
Copy link
Copy Markdown
Contributor

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

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 AIChatService from the prior Responses client/options types to ResponsesClient + CreateResponseOptions.
  • Updated streaming/non-streaming response creation to populate InputItems on 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.

Comment thread EssentialCSharp.Chat.Shared/Services/AIChatService.cs
Comment thread EssentialCSharp.Chat.Shared/Services/AIChatService.cs
Comment thread Directory.Packages.props
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.
@BenjaminMichaelis BenjaminMichaelis force-pushed the benjaminmichaelis/upgrade-nuget branch from ede01da to d98acf4 Compare May 17, 2026 04:52
- 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.
Copilot AI review requested due to automatic review settings May 17, 2026 05:00
Copy link
Copy Markdown
Contributor

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

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,

Comment thread Directory.Packages.props
@BenjaminMichaelis BenjaminMichaelis merged commit 283640f into main May 17, 2026
12 checks passed
@BenjaminMichaelis BenjaminMichaelis deleted the benjaminmichaelis/upgrade-nuget branch May 17, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants