.NET: fix: align Anthropic Extensions AI version#5709
.NET: fix: align Anthropic Extensions AI version#5709danyalahmed1995 wants to merge 3 commits intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a .NET provider regression (see #5707) by aligning the Anthropic NuGet dependency with the current Microsoft.Extensions.AI surface area and re-enabling the Anthropic integration coverage that was previously suppressed due to a binary incompatibility.
Changes:
- Bumped central package version for
Anthropicfrom12.13.0to12.20.0. - Re-enabled Anthropic Skills integration tests by restoring the normal integration test category trait.
- Removed the hard
Assert.Skip(...)that was preventing Anthropic integration fixture initialization from running at all.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicSkillsIntegrationTests.cs | Re-enables Anthropic Skills integration tests by switching the trait back to Integration. |
| dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.cs | Removes the blanket skip so Anthropic integration tests can execute again (and still skip when config is missing). |
| dotnet/Directory.Packages.props | Updates the centrally-managed Anthropic package version to 12.20.0. |
|
Converting back to draft PR. @danyalahmed1995, thank you very much for your contribution. Please see the build errors in the Unit Test projects. When you have it working locally, please switch back to "ready for review". |
|
@lokitoth Thanks for the heads up. I found the Unit Test compile errors: the Anthropic package update added new interface members to |
|
@lokitoth Patched the Anthropic unit test stubs for the new |
Summary
Related to #5707.
Addresses the Anthropic side of a regression where provider usage could fail with
MissingMethodExceptionaroundMicrosoft.Extensions.AI.WebSearchToolResultContent.Results.This PR does not change the repo-pinned
Google.GenAIdependency. During investigation, the latest availableGoogle.GenAIpackage I found was1.6.1, and it still appeared to referenceWebSearchToolResultContent.set_Results, so the Google.GenAI side likely needs an upstream package update or a broader dependency strategy.Changes
Anthropicfrom12.13.0to12.20.0Anthropic12.20.0no longer references the removedResultsaccessorValidation
git diff --check HEAD~1..HEADAnthropic12.20.0no longer references the removedWebSearchToolResultContent.ResultsaccessorGoogle.GenAI1.6.0is not changed by this PRGoogle.GenAIpackage found during investigation,1.6.1, and it still appears to referenceWebSearchToolResultContent.set_Resultsdotnet restoreblocked locally because repo requires .NET SDK10.0.200; installed SDK is9.0.313dotnet buildblocked locally for the same SDK reasondotnet testblocked locally for the same SDK reasonRelated to #5707