Repository navigation
Refactoring route selection logic to improve extensability - #626
Merged
Rodrigo Brandão (rodrigobr-msft) merged 7 commits intoOct 16, 2026
Merged
Conversation
…nnel id for various route hooks
Rodrigo Brandão (rodrigobr-msft)
marked this pull request as ready for review
October 14, 2026 18:09
Rodrigo Brandão (rodrigobr-msft)
requested a review
from a team
as a code owner
October 14, 2026 18:09
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several documented sample workflows cannot run because their commands use incorrect invocation modes or reference missing files.
4 open findings
What changed in this PR
Refactors routing in the Microsoft 365 Agents SDK for Python to support reusable selectors and channel-specific handlers.
Changes:
- Adds shared selectors and optional channel filtering to core route hooks.
- Scopes direct Teams routes to Teams channels and reuses invoke-name matching.
- Expands routing tests, sample documentation, and release notes.
| File | Description |
|---|---|
| tests/hosting_msteams/test_routing_integration.py | Tests Teams-only route dispatch. |
| tests/hosting_core/app/test_selector.py | Tests reusable selector behavior. |
| tests/hosting_core/app/test_agent_application_routes.py | Tests channel-filtered route hooks. |
| test_samples/README.md | Adds setup guidance and a sample index. |
| libraries/microsoft-agents-hosting-msteams/microsoft_agents/hosting/msteams/teams_agent_extension.py | Applies Teams channel filtering. |
| libraries/microsoft-agents-hosting-msteams/microsoft_agents/hosting/msteams/message/message.py | Reuses invoke-name selection. |
| libraries/microsoft-agents-hosting-msteams/microsoft_agents/hosting/msteams/message_extension/message_extension.py | Reuses selectors across message-extension hooks. |
| libraries/microsoft-agents-hosting-msteams/microsoft_agents/hosting/msteams/config/config.py | Reuses selection for configuration invokes. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/agent_application.py | Integrates selectors and channel filters. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/_selector.py | Introduces composable route selectors. |
| changelog.md | Documents channel-aware routing. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Kyle Rohn (kylerohn-msft)
approved these changes
Oct 16, 2026
Rodrigo Brandão (rodrigobr-msft)
deleted the
users/robrandao/app-selector-helpers
branch
October 16, 2026 18:49
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.

Summary
channel_idfiltering toAgentApplicationroute hooks and scope directTeamsAgentExtensionroutes to the Teams channel.test_samplesREADME with a sample index and corrected package guidance.Testing