Skip to content

[BUG] Azure AI Agents streaming runs fail with server_error for MCP-bound agents (API 2025-05-15-preview) #38392

@colintso-mstar

Description

@colintso-mstar

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.

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI AgentsService AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions