Add message to session store for MCP sse in post path before returning.

This commit is contained in:
Hemang
2025-05-14 15:44:52 +02:00
parent fefc22eea0
commit a214837b1e
+1 -3
View File
@@ -333,9 +333,7 @@ async def _hook_tool_call(session_id: str, request_json: dict) -> Tuple[dict, bo
},
}, True
# Push trace to the explorer - don't block on its response
asyncio.create_task(
session_store.add_message_to_session(session_id, message, guardrails_result)
)
await session_store.add_message_to_session(session_id, message, guardrails_result)
return request_json, False