Skip to content

fix(send_message): add WeCom native MEDIA attachment delivery (#27947)#27967

Open
zccyman wants to merge 1 commit into
NousResearch:mainfrom
atyou2happy:fix/wecom-file-attachment-27947
Open

fix(send_message): add WeCom native MEDIA attachment delivery (#27947)#27967
zccyman wants to merge 1 commit into
NousResearch:mainfrom
atyou2happy:fix/wecom-file-attachment-27947

Conversation

@zccyman

@zccyman zccyman commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

WeCom adapter already has _send_media_source / _upload_media_bytes / _send_media_message for outbound file delivery, but send_message_tool.py never routed MEDIA files through it — the tool fell through to the "non-media platform" path and silently dropped attachments with a warning.

Changes

  • Add WeCom to the media-platform routing block in _send_to_platform() (same pattern as Weixin/Feishu/Signal/Yuanbao)
  • Extend _send_wecom() with media_files parameter that uploads each file via adapter._send_media_source before sending text caption
  • Update platform list in error/warning messages to include wecom

Testing

  • 5 new test cases in tests/tools/test_send_wecom_media.py covering:
    • Text-only path unchanged
    • Media + text sends media then text
    • Media-only (no text) sends just media
    • Media upload failure returns error
    • Multiple media files all sent
  • 134 existing test_send_message_tool.py tests pass (zero regression)

Fixes #27947

…search#27947)

WeCom adapter already has _send_media_source / _upload_media_bytes /
_send_media_message for outbound file delivery, but send_message_tool.py
never routed MEDIA files through it — the tool fell through to the
"non-media platform" path and silently dropped attachments.

Add WeCom to the media-platform routing (same pattern as Weixin) and
extend _send_wecom() with a media_files parameter that uploads each file
via adapter._send_media_source before sending the text caption.

Fixes NousResearch#27947
@BoardJames-Bot

Copy link
Copy Markdown

BoardJames triage: this looks shared/systemic rather than branch-local. The PR-specific checks (lint/nix/e2e/builds/attribution/history) are green where completed; the remaining blocker is the main Tests / test job, which is currently failing/timing out across unrelated PRs and on main itself (latest main run hit the same aux/session_search + kanban dashboard + compression/Anthropic test drift). I pushed the missing aux/session_search default fix onto the existing systemic fix PR #27931 and validated the affected files locally (125 passed). Next action is maintainer review/workflow approval/merge of #27931, then rerun this PR's Tests / test; no branch-local author action is indicated from the logs I can see.

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/wecom WeCom / WeChat Work adapter P2 Medium — degraded but workaround exists labels May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/wecom WeCom / WeChat Work adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WeCom file attachment broken after v0.14 upgrade (worked in v0.13)

3 participants