Skip to content

Commit d8619b9

Browse files
.NET: fix: align Anthropic Extensions AI version (microsoft#5709)
* fix: align Anthropic Extensions AI version * test: update Anthropic test stubs for new interfaces --------- Co-authored-by: Jacob Alber <jaalber@microsoft.com>
1 parent ae57616 commit d8619b9

5 files changed

Lines changed: 11 additions & 12 deletions

File tree

dotnet/Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212
<ItemGroup>
1313
<!-- Aspire.* -->
14-
<PackageVersion Include="Anthropic" Version="12.13.0" />
14+
<PackageVersion Include="Anthropic" Version="12.20.0" />
1515
<PackageVersion Include="Anthropic.Foundry" Version="0.5.0" />
1616
<PackageVersion Include="Aspire.Hosting" Version="$(AspireAppHostSdkVersion)" />
1717
<PackageVersion Include="Aspire.Azure.AI.OpenAI" Version="13.0.0-preview.1.25560.3" />
@@ -194,4 +194,4 @@
194194
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
195195
</PackageReference>
196196
</ItemGroup>
197-
</Project>
197+
</Project>

dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ public Task DeleteSessionAsync(AgentSession session) =>
102102

103103
public async ValueTask InitializeAsync()
104104
{
105-
// Temporarily disabled: Anthropic SDK has a binary incompatibility with the current
106-
// Microsoft.Extensions.AI version (WebSearchToolResultContent.Results method not found).
107-
// See: https://github.com/microsoft/agent-framework/pull/5515
108-
Assert.Skip("Anthropic integration tests temporarily disabled due to SDK incompatibility with Microsoft.Extensions.AI");
109-
110105
try
111106
{
112107
_ = TestConfiguration.GetRequiredValue(TestSettings.AnthropicApiKey);

dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicSkillsIntegrationTests.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ namespace AnthropicChatCompletion.IntegrationTests;
1818
/// Integration tests for Anthropic Skills functionality.
1919
/// These tests are designed to be run locally with a valid Anthropic API key.
2020
/// </summary>
21-
/// <remarks>
22-
/// Temporarily disabled due to Anthropic SDK binary incompatibility with
23-
/// the current Microsoft.Extensions.AI version (WebSearchToolResultContent.Results).
24-
/// </remarks>
25-
[Trait("Category", "IntegrationDisabled")]
21+
[Trait("Category", "Integration")]
2622
public sealed class AnthropicSkillsIntegrationTests
2723
{
2824
[Fact]

dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ public TestAnthropicChatClient()
442442
public TimeSpan? Timeout { get => throw new NotImplementedException(); init => throw new NotImplementedException(); }
443443
public string? ApiKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); }
444444
public string? AuthToken { get => throw new NotImplementedException(); init => throw new NotImplementedException(); }
445+
public string? WebhookKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); }
445446

446447
public IAnthropicClientWithRawResponse WithRawResponse => throw new NotImplementedException();
447448

@@ -491,6 +492,12 @@ public TestBetaService(IAnthropicClient client)
491492

492493
public global::Anthropic.Services.Beta.IVaultService Vaults => throw new NotImplementedException();
493494

495+
public global::Anthropic.Services.Beta.IMemoryStoreService MemoryStores => throw new NotImplementedException();
496+
497+
public global::Anthropic.Services.Beta.IWebhookService Webhooks => throw new NotImplementedException();
498+
499+
public global::Anthropic.Services.Beta.IUserProfileService UserProfiles => throw new NotImplementedException();
500+
494501
public IBetaService WithOptions(Func<ClientOptions, ClientOptions> modifier)
495502
{
496503
throw new NotImplementedException();

dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public TestAnthropicChatClient()
7272
public TimeSpan? Timeout { get => throw new NotImplementedException(); init => throw new NotImplementedException(); }
7373
public string? ApiKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); }
7474
public string? AuthToken { get => throw new NotImplementedException(); init => throw new NotImplementedException(); }
75+
public string? WebhookKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); }
7576

7677
public IAnthropicClientWithRawResponse WithRawResponse => throw new NotImplementedException();
7778

0 commit comments

Comments
 (0)