This commit is contained in:
Timothy Jaeryang Baek
2025-09-28 12:42:02 -05:00
parent 3aad157006
commit 742e2ff193
2 changed files with 14 additions and 11 deletions

View File

@@ -1552,7 +1552,7 @@ async def chat_completion(
finally:
try:
if mcp_clients := metadata.get("mcp_clients"):
for client in mcp_clients:
for client in mcp_clients.values():
await client.disconnect()
except Exception as e:
log.debug(f"Error cleaning up: {e}")