Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Python: .NET: [Bug]: 04_MultiModelService sample uses retired claude-sonnet-4-20250514

Đã đóng
#8,878 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@westey-m đang làm issue này rồi.

Từ ngày 30/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

.NET python reproduced
Description

The .NET Start Here workflow sample dotnet/samples/03-workflows/_StartHere/04_MultiModelService creates its Anthropic client with claude-sonnet-4-20250514 (Program.cs, line 17). Anthropic retired that model on June 15, 2026 and lists claude-sonnet-4-6 as its replacement on the model deprecations page, so the reporter agent's requests fail for anyone who runs the sample today.

The sample is in the solution (agent-framework-dotnet.slnx, line 301) and in the table in dotnet/samples/03-workflows/README.md. The automated check would not catch it: in dotnet/eng/verify-samples/WorkflowSamples.cs (line 59) the sample is skipped, and that entry still lists the Bedrock keys from before #5074 moved the researcher agent to Google.

Expected: the sample uses a current Anthropic model, and the verify-samples entry lists the keys the sample reads (GOOGLE_GENAI_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY).

The same model ID also appears in python/packages/anthropic/AGENTS.md (line 18), which is documentation rather than code.

I found this by reading the code at e23f3c8; I haven't run the sample.

Code Sample
IChatClient anthropic = new Anthropic.AnthropicClient(
    new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_API_KEY") })
    .AsIChatClient("claude-sonnet-4-20250514");
Error Messages / Stack Traces

Not run.

Package Versions

main at e23f3c8 (the sample references the Anthropic package through central package management)

.NET Version

Not run

Additional Context

I'm happy to open the PR for this.

Ngôn ngữ chính
Python
Star
14.2k
Fork
2.5k
Merge trung bình
2 ngày 14 giờ
Pull request đã merge (30 ngày)
381

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/agent-framework

Tất cả issue của microsoft/agent-framework

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.