Skip to content
Discussion options

You must be logged in to vote

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_messages handle 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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@moonbox3
Comment options

Answer selected by moonbox3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants