Skip to content

.NET: Change Anthropic Azure sample to use Athropic.Foundry package + cachi… - #2578

Merged
Roger Barreto (rogerbarreto) merged 5 commits into
microsoft:mainfrom
rogerbarreto:update-anthropic-foundry
Dec 2, 2025
Merged

.NET: Change Anthropic Azure sample to use Athropic.Foundry package + cachi…#2578
Roger Barreto (rogerbarreto) merged 5 commits into
microsoft:mainfrom
rogerbarreto:update-anthropic-foundry

Conversation

@rogerbarreto

Copy link
Copy Markdown
Member

Motivation and Context

Update Anthropic Sample to use Anthropic.Foundry dedicated package.

CopilotAI review requested due to automatic review settings December 2, 2025 13:27
@markwallace-microsoftMark Wallace (markwallace-microsoft) added the .NET Usage: [Issues, PRs], Target: .Net label Dec 2, 2025
@github-actionsgithub-actionsBot changed the title Change Anthropic Azure sample to use Athropic.Foundry package + cachi….NET: Change Anthropic Azure sample to use Athropic.Foundry package + cachi…Dec 2, 2025

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Anthropic Azure sample to use the dedicated Anthropic.Foundry package instead of a custom implementation, simplifying the authentication flow and improving code maintainability.

Key Changes:

  • Migrated from custom AnthropicFoundryClient to new Anthropic.Foundry package (v0.1.0)
  • Refactored authentication using IAnthropicFoundryCredentials interface with new credential classes
  • Updated Anthropic core package from v10.4.0 to v11.0.0

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

FileDescription
dotnet/samples/GettingStarted/AgentProviders/Agent_With_Anthropic/Program.csReplaced custom AnthropicFoundryClient with new AnthropicAzureTokenCredential class implementing IAnthropicFoundryCredentials; updated client initialization to use foundry-specific credential types
dotnet/samples/GettingStarted/AgentProviders/Agent_With_Anthropic/Agent_With_Anthropic.csprojAdded Anthropic.Foundry package reference
dotnet/Directory.Packages.propsUpdated Anthropic package to v11.0.0 and Anthropic.Foundry to v0.1.0

…pic/Program.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Dec 2, 2025
Merged via the queue into microsoft:main with commit ceaea46Dec 2, 2025
14 checks passed
@github-project-automationgithub-project-automationBot moved this from In Review to Done in Agent FrameworkDec 2, 2025
Aris Nguyen (arisng) pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
… cachi… (microsoft#2578)
* Change Anthropic Azure sample to use Athropic.Foundry package + caching token
* Fix apikey null
* Update dotnet/samples/GettingStarted/AgentProviders/Agent_With_Anthropic/Program.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Address copilot feedback
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NETUsage: [Issues, PRs], Target: .Net

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@rogerbarreto@SergeyMenshykh@markwallace-microsoft