hermes - 💡(How to fix) Fix [Bug]: Feishu Plugin MEDIA Protocol Support Issue [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#24906Fetched 2026-05-14 03:50:44
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
labeled ×5commented ×1renamed ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Code Example

send_message(target="feishu", message="MEDIA:/path/to/image.png")

---

通过代码审查发现问题的根本原因:

**问题位置**: `/home/zhangjian/.hermes/hermes-agent/tools/send_message_tool.py`

**关键代码段**:
1.593-607行:Feishu 支持 MEDIA 的正确路径
   
   if platform == Platform.FEISHU and media_files:
       # 正确处理 MEDIA 文件
       result = await _send_feishu(pconfig, chat_id, chunk, media_files=media_files if is_last else None, thread_id=thread_id)
   

2.644行:Feishu 非 MEDIA 路径
   
   elif platform == Platform.FEISHU:
       result = await _send_feishu(pconfig, chat_id, chunk, thread_id=thread_id)
   

3.613行:错误提示信息
   
   f"send_message MEDIA delivery is currently only supported for telegram, discord, matrix, weixin, signal, yuanbao and feishu;"

---



---

if platform == Platform.FEISHU and media_files:
       # 正确处理 MEDIA 文件
       result = await _send_feishu(pconfig, chat_id, chunk, media_files=media_files if is_last else None, thread_id=thread_id)

---

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

---

f"send_message MEDIA delivery is currently only supported for telegram, discord, matrix, weixin, signal, yuanbao and feishu;"
RAW_BUFFERClick to expand / collapse

Bug Description

用户反馈 Feishu 插件无法使用 MEDIA 协议发送图片,但 comfyui-workflow-manager 可以正常发送。

经过代码审查发现,Feishu 平台实际上支持 MEDIA 协议,问题在于 send_message 工具的调用路径选择。

Steps to Reproduce

  1. 配置 Feishu 插件并连接到 Hermes Agent
  2. 尝试使用 send_message 工具发送 MEDIA 协议图片:
    send_message(target="feishu", message="MEDIA:/path/to/image.png")
  3. 观察发送失败或无响应
  4. 对比使用 comfyui-workflow-manager 发送图片(成功)

Expected Behavior

Feishu 插件应该能够通过 send_message 工具正常发送 MEDIA 协议图片,与 comfyui-workflow-manager 的行为一致。

Actual Behavior

  • send_message 工具无法通过 Feishu 发送 MEDIA 协议图片
  • comfyui-workflow-manager 可以直接发送图片到 Feishu(成功)
  • 用户误以为 Feishu 不支持 MEDIA 协议

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp), Tools (terminal, file ops, web, code execution, etc.)

Messaging Platform (if gateway-related)

No response

Debug Report

通过代码审查发现问题的根本原因:

**问题位置**: `/home/zhangjian/.hermes/hermes-agent/tools/send_message_tool.py`

**关键代码段**:
1. 第593-607行:Feishu 支持 MEDIA 的正确路径
   
   if platform == Platform.FEISHU and media_files:
       # 正确处理 MEDIA 文件
       result = await _send_feishu(pconfig, chat_id, chunk, media_files=media_files if is_last else None, thread_id=thread_id)
   

2. 第644行:Feishu 非 MEDIA 路径
   
   elif platform == Platform.FEISHU:
       result = await _send_feishu(pconfig, chat_id, chunk, thread_id=thread_id)
   

3. 第613行:错误提示信息
   
   f"send_message MEDIA delivery is currently only supported for telegram, discord, matrix, weixin, signal, yuanbao and feishu;"

Operating System

ubuntu 24.04

Python Version

3.13.5

Hermes Version

Hermes Agent v0.12.0 (2026.4.30)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

通过代码审查发现问题的根本原因:

问题位置: /home/zhangjian/.hermes/hermes-agent/tools/send_message_tool.py

关键代码段:

  1. 第593-607行:Feishu 支持 MEDIA 的正确路径

    if platform == Platform.FEISHU and media_files:
        # 正确处理 MEDIA 文件
        result = await _send_feishu(pconfig, chat_id, chunk, media_files=media_files if is_last else None, thread_id=thread_id)
  2. 第644行:Feishu 非 MEDIA 路径

    elif platform == Platform.FEISHU:
        result = await _send_feishu(pconfig, chat_id, chunk, thread_id=thread_id)
  3. 第613行:错误提示信息

    f"send_message MEDIA delivery is currently only supported for telegram, discord, matrix, weixin, signal, yuanbao and feishu;"

Proposed Fix (optional)

  1. 检查 MEDIA 标签解析逻辑,确保正确提取媒体文件
  2. 验证 _send_to_platform 函数中的平台路由逻辑
  3. 确保当 media_files 存在时,Feishu 平台正确走第593行的 MEDIA 支持路径
  4. 添加详细的调试日志,帮助诊断 MEDIA 协议处理流程

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING