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
Python: raw-data content mappings lose annotations and attachment metadata #8632
Passing a raw-data content mapping to Content.from_dict or Message silently drops annotations, additional_properties, and raw_representation. The equivalent Content.from_data call preserves all three.
This loses useful file metadata such as additional_properties["filename"], which file adapters and Content Understanding use to identify attachments.
Expected: the supplied annotations, {"filename": "document.txt"}, and True.
Actual: None {} False for both parsing paths. The binary payload itself is correctly encoded.
Error Messages / Stack Traces
No exception is raised; the metadata is silently discarded.
Package Versions
agent-framework-core 1.19.0, reproduced from main at 98a982a.
Python Version
Python 3.12.13, macOS arm64.
Additional Context
The raw-data branch in Content.from_dict delegates to cls.from_data without forwarding the three metadata fields it has already extracted. I am preparing a small fix with regression coverage for both direct parsing and Message inputs. Passing a Content.from_data(...) instance directly is a workaround.
I’d like to take this. I’ll verify both Content.from_dict() and Message parsing on the current main, add regression coverage for the three dropped fields, and make the smallest change that preserves the existing from_data() behavior. I’ll keep this separate from unrelated content-mapping work.
Thanks for the reports. I checked the current timeline before publishing and found that #8634 already covers this exact change; #8701 has since merged the same fix. I’m withdrawing my planned implementation to avoid a duplicate, and no PR from me is needed for this issue.
Your report identifies revision 98a982a, which predates merged fix 91fd470 by three days. On current source, your exact sample preserves all three metadata fields through both parsing paths. Because the package metadata still says 1.19.0, use a build containing that fix rather than relying on the version number alone.
Activity
feiiiiii5 commentedon Sep 24, 2026
I’d like to take this. I’ll verify both
Content.from_dict()andMessageparsing on the currentmain, add regression coverage for the three dropped fields, and make the smallest change that preserves the existingfrom_data()behavior. I’ll keep this separate from unrelated content-mapping work.feiiiiii5 commentedon Sep 24, 2026
Thanks for the reports. I checked the current timeline before publishing and found that #8634 already covers this exact change; #8701 has since merged the same fix. I’m withdrawing my planned implementation to avoid a duplicate, and no PR from me is needed for this issue.
github-actions commentedon Sep 29, 2026
👋 Hi Yufei (@Yufei-Z) — thanks for the report!
Your report identifies revision
98a982a, which predates merged fix91fd470by three days. On current source, your exact sample preserves all three metadata fields through both parsing paths. Because the package metadata still says 1.19.0, use a build containing that fix rather than relying on the version number alone.1.19.01.19.0If upgrading to the latest release doesn't fix it, please reopen and we'll take another look. 🙏