Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request disables streaming responses for agentic requests in Microsoft Teams channel by adding conditional logic to check if an incoming request is agentic and setting the streaming flag to False in such cases.
- Added conditional check using
is_agentic_request()method to detect agentic requests - Disabled streaming for agentic requests with
_is_streaming_channel = False - Added TODO comment for future streaming support for agentic requests
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...-agents-hosting-aiohttp/microsoft_agents/hosting/aiohttp/app/streaming/streaming_response.py
Show resolved
Hide resolved
...-agents-hosting-aiohttp/microsoft_agents/hosting/aiohttp/app/streaming/streaming_response.py
Show resolved
Hide resolved
MattB-msft
approved these changes
Nov 13, 2025
axelsrz
approved these changes
Nov 13, 2025
Closed
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.
This pull request updates the streaming response logic to handle agentic requests differently in the
microsoft_agents/hosting/aiohttp/app/streaming/streaming_response.pyfile. The main change ensures that agentic requests are not treated as streaming, with a clear TODO for future support.Streaming logic update:
_set_defaultsmethod, agentic requests detected viacontext.activity.is_agentic_request()are now explicitly set to not use streaming responses (self._is_streaming_channel = False), with a TODO comment for future enablement.