hermes - 💡(How to fix) Fix Feishu: markdown tables render as raw text instead of using interactive card

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…

Root Cause

In gateway/platforms/feishu.py, the _build_outbound_payload() method at line ~4007 detects markdown tables via _MARKDOWN_TABLE_RE and deliberately forces the message into text mode instead of using a format that can properly render tables:

def _build_outbound_payload(self, content: str) -> tuple[str, str]:
    # Feishu post-type 'md' elements do not render markdown tables
    if _MARKDOWN_TABLE_RE.search(content):
        text_payload = {"text": content}
        return "text", json.dumps(text_payload, ensure_ascii=False)  # forced text mode

The comment even acknowledges this: "Feishu post-type 'md' elements do not render markdown tables; sending table content as post causes the message to appear blank on the client."

Code Example

def _build_outbound_payload(self, content: str) -> tuple[str, str]:
    # Feishu post-type 'md' elements do not render markdown tables
    if _MARKDOWN_TABLE_RE.search(content):
        text_payload = {"text": content}
        return "text", json.dumps(text_payload, ensure_ascii=False)  # forced text mode

---

{
  "schema": "2.0",
  "body": {
    "elements": [{
      "tag": "markdown",
      "content": "| 特性 | MiniMax | DeepSeek |\n|---|---|---|..."
    }]
  }
}
RAW_BUFFERClick to expand / collapse

Bug Description

When Hermes sends a Feishu message containing a markdown table, the table is rendered as raw text with all the | and - characters visible, instead of being rendered as a proper Feishu table.

Root Cause

In gateway/platforms/feishu.py, the _build_outbound_payload() method at line ~4007 detects markdown tables via _MARKDOWN_TABLE_RE and deliberately forces the message into text mode instead of using a format that can properly render tables:

def _build_outbound_payload(self, content: str) -> tuple[str, str]:
    # Feishu post-type 'md' elements do not render markdown tables
    if _MARKDOWN_TABLE_RE.search(content):
        text_payload = {"text": content}
        return "text", json.dumps(text_payload, ensure_ascii=False)  # forced text mode

The comment even acknowledges this: "Feishu post-type 'md' elements do not render markdown tables; sending table content as post causes the message to appear blank on the client."

Comparison with OpenClaw

OpenClaw handles this differently — it detects tables and switches to interactive card (msg_type: "interactive") format, which properly renders markdown tables:

{
  "schema": "2.0",
  "body": {
    "elements": [{
      "tag": "markdown",
      "content": "| 特性 | MiniMax | DeepSeek |\n|---|---|---|..."
    }]
  }
}

Expected Behavior

Tables should render as proper Feishu table elements, not as raw text with markdown pipe characters visible.

Proposed Solution

When a markdown table is detected, use interactive card format instead of text format — Feishu interactive cards properly render markdown tables.

Environment

  • Hermes Agent version: current main
  • Feishu platform

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