From 5ba1c6f0cc92d2d779f4c67e15e521f55a13f154 Mon Sep 17 00:00:00 2001
From: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Date: Tue, 3 Mar 2026 15:28:24 -0800
Subject: [PATCH] .NET: Updated Copilot SDK to the latest version (#4406)
* Updated Copilot SDK to the latest version
* Added retry
---
dotnet/Directory.Packages.props | 4 ++--
.../AzureAIAgentsPersistentCreateTests.cs | 13 +++++++++----
.../GitHubCopilotAgentTests.cs | 4 ++--
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props
index 1b1e0daa08..c052057a58 100644
--- a/dotnet/Directory.Packages.props
+++ b/dotnet/Directory.Packages.props
@@ -94,7 +94,7 @@
-
+
@@ -187,4 +187,4 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
\ No newline at end of file
+
diff --git a/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentCreateTests.cs b/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentCreateTests.cs
index ab2e1848a5..f750b5a8e7 100644
--- a/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentCreateTests.cs
+++ b/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentCreateTests.cs
@@ -132,10 +132,15 @@ public class AzureAIAgentsPersistentCreateTests
}
}
- [Theory]
- [InlineData("CreateWithChatClientAgentOptionsAsync")]
- [InlineData("CreateWithFoundryOptionsAsync")]
- public async Task CreateAgent_CreatesAgentWithCodeInterpreterAsync(string createMechanism)
+ [Fact]
+ public Task CreateAgent_CreatesAgentWithCodeInterpreter_ChatClientAgentOptionsAsync()
+ => this.CreateAgent_CreatesAgentWithCodeInterpreterAsync("CreateWithChatClientAgentOptionsAsync");
+
+ [RetryFact(Constants.RetryCount, Constants.RetryDelay)]
+ public Task CreateAgent_CreatesAgentWithCodeInterpreter_FoundryOptionsAsync()
+ => this.CreateAgent_CreatesAgentWithCodeInterpreterAsync("CreateWithFoundryOptionsAsync");
+
+ private async Task CreateAgent_CreatesAgentWithCodeInterpreterAsync(string createMechanism)
{
// Arrange.
const string AgentInstructions = """
diff --git a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs
index 8a4d3c1068..5806636925 100644
--- a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs
+++ b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs
@@ -109,7 +109,7 @@ public sealed class GitHubCopilotAgentTests
var hooks = new SessionHooks();
var infiniteSessions = new InfiniteSessionConfig();
var systemMessage = new SystemMessageConfig { Mode = SystemMessageMode.Append, Content = "Be helpful" };
- PermissionHandler permissionHandler = (_, _) => Task.FromResult(new PermissionRequestResult());
+ PermissionRequestHandler permissionHandler = (_, _) => Task.FromResult(new PermissionRequestResult());
UserInputHandler userInputHandler = (_, _) => Task.FromResult(new UserInputResponse { Answer = "input" });
var mcpServers = new Dictionary { ["server1"] = new McpLocalServerConfig() };
@@ -160,7 +160,7 @@ public sealed class GitHubCopilotAgentTests
var hooks = new SessionHooks();
var infiniteSessions = new InfiniteSessionConfig();
var systemMessage = new SystemMessageConfig { Mode = SystemMessageMode.Append, Content = "Be helpful" };
- PermissionHandler permissionHandler = (_, _) => Task.FromResult(new PermissionRequestResult());
+ PermissionRequestHandler permissionHandler = (_, _) => Task.FromResult(new PermissionRequestResult());
UserInputHandler userInputHandler = (_, _) => Task.FromResult(new UserInputResponse { Answer = "input" });
var mcpServers = new Dictionary { ["server1"] = new McpLocalServerConfig() };