Skip to content

[Bug] Feishu file sending broken: media_files parameter not passed to _send_feishu() #10136

@godsay1983

Description

@godsay1983

Bug Description

When using send_message tool to send files to Feishu, the media_files parameter is not passed to the _send_feishu() function, causing file attachments to be silently dropped.

Root Cause

In tools/send_message_tool.py, line ~425, the code calls:

elif platform == Platform.FEISHU:
    result = await _send_feishu(pconfig, chat_id, chunk, thread_id=thread_id)

The media_files parameter is missing from this call. Compare with the Telegram implementation which correctly passes media_files:

result = await _send_telegram(
    pconfig.token,
    chat_id,
    chunk,
    media_files=media_files if is_last else [],
    thread_id=thread_id,
)

The Fix

Change line 425 to:

elif platform == Platform.FEISHU:
    result = await _send_feishu(pconfig, chat_id, chunk, media_files=media_files, thread_id=thread_id)

The _send_feishu() function at line 974 already correctly accepts and processes media_files:

async def _send_feishu(pconfig, chat_id, message, media_files=None, thread_id=None):
    # ... correctly handles media_files for images, videos, voice, audio, and documents

Impact

  • Files sent via MEDIA:/path/to/file syntax are silently dropped for Feishu platform
  • Only text messages are sent, attachments are lost
  • Other platforms (Telegram, QQBot, etc.) work correctly

Verification

Test by sending a file via Feishu using the MEDIA:/path/to/file syntax in a message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/toolsTool registry, model_tools, toolsetsplatform/feishuFeishu / Lark adaptertype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions