hermes - ✅(Solved) Fix Feishu group messages ignore require_group_mention=false from config.yaml [2 pull requests, 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#15226Fetched 2026-04-25 06:23:35
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×5cross-referenced ×2commented ×1

Feishu group messages still require an explicit bot mention even when ~/.hermes/config.yaml sets:

feishu:
  require_group_mention: false
  default_group_policy: open

Root Cause

gateway/platforms/feishu.py has group-message routing logic, but the gateway config loader did not bridge Feishu-specific group reply settings from config.yaml into the runtime PlatformConfig.extra. As a result, the Feishu adapter used the default mention-required behavior.

Fix Action

Fixed

PR fix notes

PR #15227: Fix Feishu group mention config

Description (problem / solution / changelog)

Fixes #15226

Summary

  • Bridge Feishu group reply settings from config.yaml into runtime PlatformConfig.extra.
  • Add require_group_mention support in the Feishu adapter with a secure default of true.
  • Coerce common boolean representations so string values like "false" work as expected.
  • Add regression tests for config bridging and unmentioned group message routing.

Verification

pytest tests/gateway/test_feishu.py tests/gateway/test_config.py -q
218 passed

Notes

This keeps group policy checks in place before accepting unmentioned group messages. Disabling mention requirements only routes messages when the existing sender/chat policy allows them.

Changed files

  • gateway/config.py (modified, +6/-0)
  • gateway/platforms/feishu.py (modified, +23/-0)
  • tests/gateway/test_config.py (modified, +20/-0)
  • tests/gateway/test_feishu.py (modified, +11/-0)

PR #15525: fix(gateway): support require_mention toggle for Feishu group chats

Description (problem / solution / changelog)

Summary

Feishu is the only platform adapter that ignores the require_mention config option. This PR adds support for it, allowing users to configure the bot to respond in group chats without requiring an @mention.

Problem

Setting require_mention: false in config.yaml under the Feishu platform block has no effect because feishu.py never reads that config value — _should_accept_group_message() is hardcoded to always require @mention. All other platforms (Telegram, Discord, Slack, WhatsApp, DingTalk, Matrix) implement this feature.

Related open issues: #15226, #5465, #10275, #9835

Changes

gateway/platforms/feishu.py — 24 lines added, 1 line modified:

  • Modified _should_accept_group_message() (line 3628): Added early-return bypass before the mention-check logic — if _feishu_require_mention() returns False or the chat_id is in _feishu_free_response_chats(), the message is accepted immediately.

  • Added _feishu_require_mention(): Reads self.config.extra.get("require_mention"), handles string/bool types, defaults to True for backward compatibility.

  • Added _feishu_free_response_chats(): Reads self.config.extra.get("free_response_channels") with FEISHU_FREE_RESPONSE_CHATS env var fallback. Supports both list and comma-separated string formats for per-chat granularity.

Design decisions

  • Pattern aligns with telegram.py implementation exactly
  • DMs (chat_type == "p2p") are unaffected — the mention gate only applies to group messages
  • @_all (Feishu's @everyone) passthrough is preserved
  • Defaults to True (require mention) for backward compatibility — existing users are not affected
  • No changes to config.yaml or gateway/config.py needed — the generic bridging loop already passes require_mention into feishu's config.extra

Test Plan

  • Running in production with require_mention: false — bot responds to all group messages without @mention
  • DMs continue to work normally
  • Unit tests for new methods (happy to add if maintainers want)

Closes #15226

Changed files

  • gateway/platforms/feishu.py (modified, +24/-1)

Code Example

feishu:
  require_group_mention: false
  default_group_policy: open

---

pytest tests/gateway/test_feishu.py tests/gateway/test_config.py -q
218 passed
RAW_BUFFERClick to expand / collapse

Summary

Feishu group messages still require an explicit bot mention even when ~/.hermes/config.yaml sets:

feishu:
  require_group_mention: false
  default_group_policy: open

Root cause

gateway/platforms/feishu.py has group-message routing logic, but the gateway config loader did not bridge Feishu-specific group reply settings from config.yaml into the runtime PlatformConfig.extra. As a result, the Feishu adapter used the default mention-required behavior.

Expected behavior

When require_group_mention: false and the group policy allows the chat/sender, unmentioned group messages should be accepted and routed to the agent.

Actual behavior

Unmentioned group messages are dropped unless the bot is explicitly mentioned.

Proposed fix

  • Bridge require_group_mention, default_group_policy, and group_rules from platform config into runtime PlatformConfig.extra.
  • Make the Feishu adapter respect require_group_mention with a secure default of true.
  • Coerce common boolean string representations such as "false".
  • Add regression coverage for config bridging and adapter group routing.

Verification

pytest tests/gateway/test_feishu.py tests/gateway/test_config.py -q
218 passed

extent analysis

TL;DR

To fix the issue, update the gateway/platforms/feishu.py to bridge Feishu-specific group reply settings from config.yaml into the runtime PlatformConfig.extra and make the Feishu adapter respect the require_group_mention setting.

Guidance

  • Review the gateway/platforms/feishu.py file to ensure it correctly loads the require_group_mention and default_group_policy settings from config.yaml into PlatformConfig.extra.
  • Verify that the Feishu adapter is updated to respect the require_group_mention setting, using a secure default of true if the setting is not provided.
  • Test the changes using the provided regression tests, specifically tests/gateway/test_feishu.py and tests/gateway/test_config.py.
  • Ensure that the group_rules setting is also bridged from the platform config into the runtime PlatformConfig.extra.

Example

No code snippet is provided as the issue already includes the necessary configuration and test code.

Notes

The fix relies on correctly updating the gateway/platforms/feishu.py file and ensuring that the Feishu adapter respects the require_group_mention setting. Additionally, the group_rules setting should be bridged into the runtime PlatformConfig.extra.

Recommendation

Apply the proposed fix to update the gateway/platforms/feishu.py file and ensure the Feishu adapter respects the require_group_mention setting, as this will resolve the issue and allow unmentioned group messages to be accepted and routed to the agent when the group policy allows it.

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…

FAQ

Expected behavior

When require_group_mention: false and the group policy allows the chat/sender, unmentioned group messages should be accepted and routed to the agent.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Feishu group messages ignore require_group_mention=false from config.yaml [2 pull requests, 1 comments, 2 participants]