.Net: Update Anthropic and Anthropic.Foundry package versions (#3517)

* Initial plan

* Update Anthropic packages to v12.3.0 and Anthropic.Foundry to v0.4.1

Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>

* Fix AnthropicClient not being disposed in sample

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
This commit is contained in:
Copilot
2026-01-30 16:48:19 +00:00
committed by GitHub
co-authored by rogerbarreto copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
parent cd7661bbb7
commit 924211a518
9 changed files with 28 additions and 69 deletions
@@ -16,7 +16,7 @@ IChatClient aws = new AmazonBedrockRuntimeClient(
.AsIChatClient("amazon.nova-pro-v1:0");
IChatClient anthropic = new Anthropic.AnthropicClient(
new() { APIKey = Environment.GetEnvironmentVariable("ANTHROPIC_APIKEY") })
new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_APIKEY") })
.AsIChatClient("claude-sonnet-4-20250514");
IChatClient openai = new OpenAI.OpenAIClient(