microsoft / microsoft/Agents-for-python
Feedback-Loop buttons and Generated-by-AI label not showing when ending a streaming
@ceciliaavila is already working on this.
Since Sep 17, 2026.
- Dominant language
- Python
- Stars
- 211
- Forks
- 90
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 20
Description
Description
The feedback buttons and AI-Generated label are not shown in a streaming message even when context.streaming_response.set_feedback_loop(True) and context.streaming_response.set_generated_by_ai_label(True) are set.
There are two bugs causing this issue:
- Feedback metadata remains contradictory
In StreamingResponse._send_activity(), setting both the feedback loop and its type enters this branch:
if self._enable_feedback_loop and self._feedback_loop_type:
streaminfo_entity.feedback_loop = {"type": self._feedback_loop_type}
else:
streaminfo_entity.feedback_loop_enabled = self._enable_feedback_loop
Because the else is skipped, feedback_loop_enabled retains the StreamInfo default of False, producing:
{
"feedbackLoop": {
"type": "default"
},
"feedbackLoopEnabled": false
}
- AI metadata requires citations
Activity.add_ai_metadata() currently wraps the entire operation in:
if citations:
Consequently, it never adds an AIEntity when the message has no citations—even when set_generated_by_ai_label(True) and a sensitivity label are configured.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.