From d8619b93ad38d519ab95e32fb8eb964be18fe803 Mon Sep 17 00:00:00 2001 From: Danyal Ahmed <58849388+danyalahmed1995@users.noreply.github.com> Date: Tue, 12 May 2026 20:35:19 +0500 Subject: [PATCH] .NET: fix: align Anthropic Extensions AI version (#5709) * fix: align Anthropic Extensions AI version * test: update Anthropic test stubs for new interfaces --------- Co-authored-by: Jacob Alber --- dotnet/Directory.Packages.props | 4 ++-- .../AnthropicChatCompletionFixture.cs | 5 ----- .../AnthropicSkillsIntegrationTests.cs | 6 +----- .../Extensions/AnthropicBetaServiceExtensionsTests.cs | 7 +++++++ .../Extensions/AnthropicClientExtensionsTests.cs | 1 + 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index abcf8ab8ea..75106b5fcb 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -11,7 +11,7 @@ - + @@ -194,4 +194,4 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - \ No newline at end of file + diff --git a/dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.cs b/dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.cs index 7c2a0c3b6c..f8ea4bc714 100644 --- a/dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.cs +++ b/dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.cs @@ -102,11 +102,6 @@ public class AnthropicChatCompletionFixture : IChatClientAgentFixture public async ValueTask InitializeAsync() { - // Temporarily disabled: Anthropic SDK has a binary incompatibility with the current - // Microsoft.Extensions.AI version (WebSearchToolResultContent.Results method not found). - // See: https://github.com/microsoft/agent-framework/pull/5515 - Assert.Skip("Anthropic integration tests temporarily disabled due to SDK incompatibility with Microsoft.Extensions.AI"); - try { _ = TestConfiguration.GetRequiredValue(TestSettings.AnthropicApiKey); diff --git a/dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicSkillsIntegrationTests.cs b/dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicSkillsIntegrationTests.cs index 82b3511993..3f25b3493f 100644 --- a/dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicSkillsIntegrationTests.cs +++ b/dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicSkillsIntegrationTests.cs @@ -18,11 +18,7 @@ namespace AnthropicChatCompletion.IntegrationTests; /// Integration tests for Anthropic Skills functionality. /// These tests are designed to be run locally with a valid Anthropic API key. /// -/// -/// Temporarily disabled due to Anthropic SDK binary incompatibility with -/// the current Microsoft.Extensions.AI version (WebSearchToolResultContent.Results). -/// -[Trait("Category", "IntegrationDisabled")] +[Trait("Category", "Integration")] public sealed class AnthropicSkillsIntegrationTests { [Fact] diff --git a/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs b/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs index cccac81eba..9836ac8fcf 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs @@ -442,6 +442,7 @@ public sealed class AnthropicBetaServiceExtensionsTests public TimeSpan? Timeout { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } public string? ApiKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } public string? AuthToken { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } + public string? WebhookKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } public IAnthropicClientWithRawResponse WithRawResponse => throw new NotImplementedException(); @@ -491,6 +492,12 @@ public sealed class AnthropicBetaServiceExtensionsTests public global::Anthropic.Services.Beta.IVaultService Vaults => throw new NotImplementedException(); + public global::Anthropic.Services.Beta.IMemoryStoreService MemoryStores => throw new NotImplementedException(); + + public global::Anthropic.Services.Beta.IWebhookService Webhooks => throw new NotImplementedException(); + + public global::Anthropic.Services.Beta.IUserProfileService UserProfiles => throw new NotImplementedException(); + public IBetaService WithOptions(Func modifier) { throw new NotImplementedException(); diff --git a/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs b/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs index 79844ed60a..2bff68a5c7 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs @@ -72,6 +72,7 @@ public sealed class AnthropicClientExtensionsTests public TimeSpan? Timeout { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } public string? ApiKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } public string? AuthToken { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } + public string? WebhookKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } public IAnthropicClientWithRawResponse WithRawResponse => throw new NotImplementedException();