You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New AttachmentDownloader and M365AttachmentDownloader implementations of InputFileDownloader interface - #604
Ports attachment downloading support from the .NET Agents SDK to Python.
Changes
Added AttachmentDownloader for standard channel attachments.
Added M365AttachmentDownloader for Teams and Microsoft 365 Copilot.
Supports remote, inline, authenticated, and anonymous attachment downloads.
Added optional outbound host validation and safe localhost URL handling.
Added outgoing audience resolution to ClaimsIdentity.
Added filenames to InputFile.
Added connector support for generating attachment URIs.
Added a handling-attachments sample based on the .NET implementation.
Added unit and end-to-end tests covering downloader routing, authentication, URL validation, failure responses, and access through state.temp.input_files.
Rodrigo Brandão (rodrigobr-msft)
changed the title
Porting two InputFileDownloaders from .NET
New AttachmentDownloader and M365AttachmentDownloader as implementations of InputFileDownloader interface
Sep 25, 2026
Token acquisition happens before determining whether any attachment is remote. Consequently an inline-only M365 turn can fail because identity/provider resolution or token acquisition fails, even though inline serialization needs no authentication. Resolve the token lazily only when a remote download is attempted.
If M365 metadata contains "downloadUrl": null or an empty string, dict.get does not use its default, so the valid content_url is ignored and the metadata is serialized as inline content. Use an or fallback so absent and empty download URLs both fall back correctly.
Include the required editable-mode config setting
test_samples/handling_attachments/README.md:22
These editable-install commands omit the repository-required --config-settings editable_mode=compat option. Match the documented setup and scripts/dev_setup.sh:5-15; otherwise contributors can get a different editable layout from the one this repository supports.
Rodrigo Brandão (rodrigobr-msft)
changed the title
New AttachmentDownloader and M365AttachmentDownloader as implementations of InputFileDownloader interface
New AttachmentDownloader and M365AttachmentDownloader implementations of InputFileDownloader interface
Sep 28, 2026
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
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
Ports attachment downloading support from the .NET Agents SDK to Python.
Changes
AttachmentDownloaderfor standard channel attachments.M365AttachmentDownloaderfor Teams and Microsoft 365 Copilot.ClaimsIdentity.InputFile.state.temp.input_files.Validation