[BUG]Sampling does not work in Vally or other MCP servers

Đang mở
#4,232 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
28/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, wasm
Lĩnh vực
api

Hướng nghiên cứu

The error text 'Sampling request must end with a user message' comes from the MCP sampling flow when a server asks its host for a completion, so start by finding where this repository builds sampling requests and checks their message order. The reproduction is the external mcp-loading-eval.yaml in Azure/azure-sdk-pr, which is not in this repo, so first confirm which side produces the invalid message list. Done means a sampling request from the azure server completes without that error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug needs-author-feedback needs-team-triage needs-triage server-Azure.Mcp tools-BestPractices tools-Core
Describe the bug

When invoking the azure-best-practices tool from inside the Vally tool, requests fail with:

ERROR  azure-best-practices
  MCP sampling request 'd1f4bb7f-3f68-4a2f-bec0-0e77877f2f69' from server 'azure' failed: Sampling
  request must end with a user message

This essentially renders the MCP server useless from inside Vally evaluations or any MCP host that supports sampling because it appears that the rejection is blocking.

Expected behavior

Sampling works in Vally.

Actual behavior

Sampling fails :(

Reproduction Steps

https://github.com/Azure/azure-sdk-pr/blob/main/sdk-agentic-evaluations/Evaluations/scripts/mcp-loading-eval.yaml

Environment

No response

Ngôn ngữ chính
C#
Star
3.9k
Fork
689
Merge trung bình
2 ngày 11 giờ
Pull request đã merge (30 ngày)
143

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/mcp

Tất cả issue của microsoft/mcp

Issue tương tự

Thêm issue về C#

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.