Azure / Azure/azure-rest-api-specs
[BUG] Azure AI Agents streaming runs fail with server_error for MCP-bound agents (API 2025-05-15-preview)
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://learn.microsoft.com/en-us/rest/api/aifoundry/aiagents/runs/create-run?view=rest-aifoundry-aiagents-2025-05-15-preview&tabs=HTTP
### API Spec version
2025-05-15-preview
### Describe the bug
The Azure AI Agents SDK streaming response fails with a "server_error" and message "Sorry, something went wrong" for an agent with a MCP server configured. The run creation call completes but the streaming response terminates without providing any run steps or assistant messages. The run status shows as "failed" with a last_error containing code "server_error".
### Expected behavior
The streaming response should successfully return run steps and assistant messages, or provide a more specific error message indicating what went wrong. The run should complete successfully or fail with actionable error details.
### Actual behavior
Issue started occurring suddenly around 4pm yesterday after working consistently before.
### Reproduction Steps
Steps to reproduce the behavior:
1. Create an AI agent with MCP (Model Context Protocol) server binding using Azure AI Agents SDK
2. Create a new thread using the Azure AI Foundry API
3. Add a message to the thread using the thread messages endpoint
4. Create a run on the thread with the bound agent
5. Initialize streaming response to monitor the run progress
6. Observe that the stream immediately terminates with server_error
7. Check run status - shows as "failed" with generic "Sorry, something went wrong." message
### Environment
macOS (not applicable - this is a Node.js/TypeScript project, not .NET)
IDE and version:
Visual Studio Code
Additional Environment Details:
Runtime: Node.js
Package Manager: Yarn
Azure AI Agents SDK Version: 1.2.0-beta.2
Project Type: Frontend UI application
API Version: 2025-05-15-preview
Contributor guide
Research direction
Start with the linked Azure AI Agents REST API specification for 2025-05-15-preview and reproduce the thread, message, run, and streaming sequence described in the issue. No repository file or test is named; done requires determining whether the REST specification needs a change or whether the failure belongs to the Azure service or SDK and should be redirected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, node.js, typescript
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100