diff --git a/agents-api/agents_api/routers/sessions/chat.py b/agents-api/agents_api/routers/sessions/chat.py index 76ef4eadd..2f336027c 100644 --- a/agents-api/agents_api/routers/sessions/chat.py +++ b/agents-api/agents_api/routers/sessions/chat.py @@ -69,6 +69,8 @@ async def chat( for m in past_messages: with suppress(KeyError): del m["created_at"] + with suppress(KeyError): + del m["id"] messages = past_messages + new_messages