Skip to content

Commit ab8dc66

Browse files
evalstategradio-pr-botfreddyaboulton
authored
route progress notifications to the POST SSE Handler for MCP Servers (#12035)
* route progress notifications to the POST SSE Handler for MCP Servers * add changeset * lint --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Freddy Boulton <41651716+freddyaboulton@users.noreply.github.com>
1 parent 31cf825 commit ab8dc66

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gradio": patch
3+
---
4+
5+
fix:route progress notifications to the POST SSE Handler for MCP Servers

gradio/mcp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ async def call_tool(
331331
progress_token=progress_token,
332332
progress=step,
333333
message=message, # type: ignore
334+
related_request_id=str(
335+
self.mcp_server.request_context.request_id
336+
),
334337
)
335338
step += 1
336339
elif update.type == "output" and update.final:

0 commit comments

Comments
 (0)