Skip to content

fix: enable Feishu media delivery in send_message#10392

Open
river-li wants to merge 1 commit into
NousResearch:mainfrom
river-li:fix/feishu-send-message-media
Open

fix: enable Feishu media delivery in send_message#10392
river-li wants to merge 1 commit into
NousResearch:mainfrom
river-li:fix/feishu-send-message-media

Conversation

@river-li

@river-li river-li commented Apr 15, 2026

Copy link
Copy Markdown

fix: enable Feishu media delivery in send_message

Summary

  • route Feishu through native send_message media delivery instead of dropping MEDIA: attachments
  • preserve Feishu text chunking while attaching media only on the final chunk
  • add regression coverage for Feishu text+media, media-only, and long-message chunking

Problem

The Feishu gateway adapter already supported native image/file sending, but the send_message tool did not expose that path. send_message parsed MEDIA:/path/to/file.png, yet _send_to_platform() only enabled native media delivery for Telegram and Weixin. For Feishu, media attachments were silently omitted even though the adapter could send them.

Root cause

tools/send_message_tool.py had a Feishu-specific helper (_send_feishu) that already accepted media_files, but _send_to_platform() routed Feishu through the generic non-media path.

Fix

  • add a dedicated Feishu branch in _send_to_platform()
  • preserve existing chunking behavior for long Feishu text messages
  • attach media_files only on the final Feishu chunk
  • update user-facing warning/error strings to reflect that native media delivery is now supported for Telegram, Feishu, and Weixin

@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.

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.

3 participants