-
|
Within the function converting AG-UI messages to Microsoft Agent Framework messages, there is logic that removes duplicate messages contained within the request body. I believe this implementation carries the risk of removing simple messages like "yes," potentially causing the conversation history to be improperly rewritten. I would like to understand the intent behind this implementation. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Good catch. The deduplication exists because AG-UI clients send the full conversation history on every request, which can produce duplicates — particularly around tool call flows (duplicate tool results with the same The catch-all branch (lines 244-253) that deduplicates by |
Beta Was this translation helpful? Give feedback.
Good catch. The deduplication exists because AG-UI clients send the full conversation history on every request, which can produce duplicates — particularly around tool call flows (duplicate tool results with the same
call_id, duplicate assistant tool call messages). The first two branches of_deduplicate_messageshandle those specific cases and are necessary to avoid API errors.The catch-all branch (lines 244-253) that deduplicates by
(role, hash(content))is where the risk you identified exists — a user saying "yes" twice in a conversation would have the second one dropped. We should scope that branch more tightly or remove it. I'll create an issue to track this.