Skip to content

.NET: fix: align Anthropic Extensions AI version#5709

Open
danyalahmed1995 wants to merge 3 commits intomicrosoft:mainfrom
danyalahmed1995:fix/issue-5707-anthropic-google-genai-preview-regression
Open

.NET: fix: align Anthropic Extensions AI version#5709
danyalahmed1995 wants to merge 3 commits intomicrosoft:mainfrom
danyalahmed1995:fix/issue-5707-anthropic-google-genai-preview-regression

Conversation

@danyalahmed1995
Copy link
Copy Markdown

@danyalahmed1995 danyalahmed1995 commented May 8, 2026

Summary

Related to #5707.

Addresses the Anthropic side of a regression where provider usage could fail with MissingMethodException around Microsoft.Extensions.AI.WebSearchToolResultContent.Results.

This PR does not change the repo-pinned Google.GenAI dependency. During investigation, the latest available Google.GenAI package I found was 1.6.1, and it still appeared to reference WebSearchToolResultContent.set_Results, so the Google.GenAI side likely needs an upstream package update or a broader dependency strategy.

Changes

  • Bumped Anthropic from 12.13.0 to 12.20.0
  • Re-enabled Anthropic integration coverage that was disabled for the binary incompatibility
  • Confirmed Anthropic 12.20.0 no longer references the removed Results accessor

Validation

  • git diff --check HEAD~1..HEAD
  • Metadata scan confirmed Anthropic 12.20.0 no longer references the removed WebSearchToolResultContent.Results accessor
  • Confirmed the repo-pinned Google.GenAI 1.6.0 is not changed by this PR
  • Separately checked the latest available Google.GenAI package found during investigation, 1.6.1, and it still appears to reference WebSearchToolResultContent.set_Results
  • dotnet restore blocked locally because repo requires .NET SDK 10.0.200; installed SDK is 9.0.313
  • dotnet build blocked locally for the same SDK reason
  • dotnet test blocked locally for the same SDK reason

Related to #5707

Copilot AI review requested due to automatic review settings May 8, 2026 08:51
@moonbox3 moonbox3 added the .NET label May 8, 2026
@github-actions github-actions Bot changed the title fix: align Anthropic Extensions AI version .NET: fix: align Anthropic Extensions AI version May 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Anthropic from 12.13.0 to 12.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.

Comment thread dotnet/Directory.Packages.props
@lokitoth lokitoth self-assigned this May 8, 2026
@lokitoth lokitoth moved this to In Review in Agent Framework May 8, 2026
@lokitoth lokitoth moved this from In Review to Community PR in Agent Framework May 8, 2026
@lokitoth
Copy link
Copy Markdown
Member

lokitoth commented May 8, 2026

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 lokitoth marked this pull request as draft May 8, 2026 20:40
@danyalahmed1995
Copy link
Copy Markdown
Author

@lokitoth Thanks for the heads up. I found the Unit Test compile errors: the Anthropic package update added new interface members to IAnthropicClient and IBetaService, and the test stubs need to be updated accordingly. I’m patching those now and will switch the PR back to ready for review once the affected test project builds locally.

@danyalahmed1995
Copy link
Copy Markdown
Author

@lokitoth Patched the Anthropic unit test stubs for the new IAnthropicClient / IBetaService interface members and pushed the update. I was able to run git diff --check. Full local build is blocked on my machine because this repo targets .NET 10.0 while my installed SDK is 9.0.313, so I’ll rely on CI for full validation.
Marked the PR ready for review again.

@danyalahmed1995 danyalahmed1995 marked this pull request as ready for review May 8, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Community PR

Development

Successfully merging this pull request may close these issues.

4 participants