This commit is contained in:
Timothy Jaeryang Baek
2026-06-29 11:56:00 -05:00
parent 10558173fb
commit ff5cec43bd
2 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -1553,7 +1553,8 @@ async def chat_completion(
# task's current cancel scope", which propagates as a
# BaseException through the finally block, discards the response
# return value, and surfaces as a 500 "No response returned."
# MCPClient.disconnect() already catches BaseException internally.
# MCPClient.disconnect() suppresses known transport teardown errors
# while still propagating real task cancellation.
try:
if mcp_clients := metadata.get('mcp_clients'):
for client in reversed(list(mcp_clients.values())):