Python: Fix duplicate streamed tool calls in DevUI - #7652
Open
Chinedum Echeta (cecheta) wants to merge 1 commit into
Open
Python: Fix duplicate streamed tool calls in DevUI#7652Chinedum Echeta (cecheta) wants to merge 1 commit into
Chinedum Echeta (cecheta) wants to merge 1 commit into
Conversation
Refs microsoft#7651 🐛 - Generated by Copilot
Chinedum Echeta (cecheta)
deployed
to
github-app-auth
August 13, 2026 16:49 — with
GitHub Actions
Active
Chinedum Echeta (cecheta)
deployed
to
github-app-auth
August 13, 2026 16:49 — with
GitHub Actions
Active
Chinedum Echeta (cecheta)
deployed
to
github-app-auth
August 13, 2026 16:49 — with
GitHub Actions
Active
Chinedum Echeta (cecheta)
deployed
to
github-app-auth
August 13, 2026 16:49 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes duplicate DevUI tool-call items while preserving streamed argument deltas.
Changes:
- Emits tool-call creation events only for unseen call IDs.
- Adds regression coverage for repeated streamed metadata.
Show a summary per file
| File | Description |
|---|---|
python/packages/devui/agent_framework_devui/_mapper.py |
Deduplicates streamed tool-call items by call ID. |
python/packages/devui/tests/devui/test_mapper.py |
Tests single-item emission and complete argument streaming. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
Contributor
Chinedum Echeta (cecheta)
marked this pull request as ready for review
August 13, 2026 16:56
Chinedum Echeta (cecheta)
deployed
to
github-app-auth
August 13, 2026 16:56 — with
GitHub Actions
Active
Evan Mattson (moonbox3)
approved these changes
Aug 14, 2026
Evan Mattson (moonbox3)
enabled auto-merge
August 14, 2026 05:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
DevUI renders repeated copies of a single streamed tool call when the provider includes the same call ID and function name on each arguments chunk. This makes one framework tool execution appear as several calls in the chat.
The mapper should announce each unique function call once and continue forwarding all argument deltas for that call.
Description & Review Guide
MessageMappernow emitsresponse.output_item.addedonly when a function call ID is first observed. A regression test covers two argument chunks that repeat the same call metadata.active_function_callsmap correctly handles repeated provider metadata without affecting parallel calls.Related Issue
Fixes #7651
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.