You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: Upgrade NuGet dependencies to latest compatible versions (#1120)
## 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:
- `OpenAIResponseClient` → `ResponsesClient`
- `ResponseCreationOptions` → `CreateResponseOptions`
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
Copy file name to clipboardExpand all lines: EssentialCSharp.Chat.Shared/Services/AIChatService.cs
+27-25Lines changed: 27 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ public partial class AIChatService
17
17
privatereadonlyAIOptions_Options;
18
18
privatereadonlyAzureOpenAIClient_AzureClient;
19
19
#pragma warning disable OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
22
22
privatereadonlyAISearchService_SearchService;
23
23
privatereadonlyILogger<AIChatService>_Logger;
@@ -34,7 +34,7 @@ public AIChatService(IOptions<AIOptions> options, AISearchService searchService,
34
34
_AzureClient=azureClient;
35
35
36
36
#pragma warning disable OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
39
39
}
40
40
@@ -47,8 +47,8 @@ public AIChatService(IOptions<AIOptions> options, AISearchService searchService,
47
47
/// <param name="tools">Optional tools for the AI to use</param>
48
48
/// <param name="reasoningEffortLevel">Optional reasoning effort level for reasoning models</param>
49
49
/// <param name="enableContextualSearch">Enable vector search for contextual information</param>
50
-
/// <param name="endUserId">Authenticated end-user identifier. Currently reserved for forwarding
51
-
/// to Azure OpenAI for abuse monitoring once the SDK exposes <c>ResponseCreationOptions.User</c>.</param>
50
+
/// <param name="endUserId">Forwarded to Azure OpenAI for abuse monitoring and Microsoft Defender
51
+
/// prompt-shield correlation via <c>CreateResponseOptions.EndUserId</c>.</param>
@@ -100,12 +100,10 @@ public AIChatService(IOptions<AIOptions> options, AISearchService searchService,
100
100
101
101
// Create the streaming response using the Responses API
102
102
#pragma warning disable OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
#pragma warning disable OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
/// Creates response options with optional features
339
340
/// </summary>
340
341
#pragma warning disable OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
354
+
options.Model=_Options.ChatDeploymentName;
353
355
354
356
// Set the system prompt via Instructions — this is stateless across turns when using previous_response_id,
355
357
// preventing accumulation of system messages in the conversation context.
#pragma warning disable OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
426
-
ResponseCreationOptionsresponseOptions,
428
+
CreateResponseOptionsresponseOptions,
427
429
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
/// All behavior-affecting properties are copied so that tool-call continuation legs
537
539
/// produce identical generation behavior to the initial leg.
538
540
/// </summary>
539
541
#pragma warning disable OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
0 commit comments