Skip to content

feat: add Feishu media attachment support to send_message tool#17083

Open
HUAyanYE wants to merge 1 commit into
NousResearch:mainfrom
HUAyanYE:fix/feishu-media-attachment-support
Open

feat: add Feishu media attachment support to send_message tool#17083
HUAyanYE wants to merge 1 commit into
NousResearch:mainfrom
HUAyanYE:fix/feishu-media-attachment-support

Conversation

@HUAyanYE

Copy link
Copy Markdown

Summary

Adds native media attachment support for Feishu/Lark platform in the send_message tool.

Changes

  • Add Feishu platform to media-capable platforms list (alongside Telegram, Discord, Matrix, Weixin, Signal)
  • Enable native media file sending (images, videos, documents) via existing FeishuAdapter
  • Update error messages to include Feishu in supported platforms list
  • Pass media_files parameter to _send_feishu function

Background

The FeishuAdapter already has full support for sending documents, images, videos, and audio files via send_document(), send_image_file(), send_video(), and send_voice() methods. However, the send_message tool was not connecting its media handling to these existing adapter capabilities.

This change adds the missing connection, allowing users to send file attachments to Feishu chats using the MEDIA:<path> syntax.

Testing

  • Verified file attachment sending works on Feishu platform
  • No more "MEDIA attachments were omitted" warning for Feishu
  • Backward compatible: text-only messages still work as before

Related

  • Feishu adapter: gateway/platforms/feishu.py
  • Send message tool: tools/send_message_tool.py

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/tools Tool registry, model_tools, toolsets platform/feishu Feishu / Lark adapter labels Apr 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #10392 — same fix: pass media_files to _send_feishu() in send_message_tool.py. See also #14365, #14892, #12461.

@HUAyanYE HUAyanYE force-pushed the fix/feishu-media-attachment-support branch from 541b7c2 to e1ae1ed Compare April 28, 2026 16:30
@HUAyanYE

Copy link
Copy Markdown
Author

Hi maintainers! 👋

I noticed there are several PRs (#10392, #12461, #14365, #14892) attempting to fix the same Feishu media attachment issue. However, all of them currently have merge conflicts (dirty state) due to recent upstream changes (e.g., Yuanbao platform support added to main).

This PR (#17083) is different because:

Conflict-free — Based on the latest main branch, mergeable state is clean
Complete error message — Includes both Feishu and Yuanbao platforms in the supported list
Minimal change — Only modifies send_message_tool.py, no unnecessary changes
Tested — Verified working with actual Feishu file sending

The fix is straightforward: pass media_files to _send_feishu() when available, matching how other platforms (Telegram, Discord, Matrix, etc.) handle media delivery.

Happy to address any feedback!

@tipani86

Copy link
Copy Markdown

Tested the same fix path locally in a Feishu DM: routing MEDIA: attachments through _send_feishu(..., media_files=...) successfully delivered Markdown files as native Feishu attachments. +1 for getting this merged.

@timmyz

timmyz commented Apr 29, 2026

Copy link
Copy Markdown

media attachemnts are really necessary. +1 for getting this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets P2 Medium — degraded but workaround exists platform/feishu Feishu / Lark adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants