hermes - 💡(How to fix) Fix Gateway config-bridging skips plugin platforms not in the Platform enum (channel_prompts silently no-op for LINE) [1 pull requests]

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…

Error Message

The gateway's per-chat config bridging (gateway/config.py) only runs for platforms in the hard-coded Platform enum. A platform provided by a plugin (e.g. the bundled LINE adapter in plugins/platforms/line/) is silently skipped, so its top-level config block — including channel_prompts and every other bridged key — never reaches the adapter's extra. The platform still connects and serves traffic; it just loses all per-chat config bridging, with no error.

Root Cause

The shared-key bridging builds its target list by converting config keys to Platform(...) and dropping anything that isn't an enum member:

try:
    _plat = Platform(_entry.name)
except (ValueError, KeyError):
    continue

Platform enumerates LOCAL/TELEGRAM/DISCORD/WHATSAPP/SLACK/SIGNAL/MATTERMOST/MATRIX/HOMEASSISTANT/EMAIL/SMS/DINGTALK/API_SERVER/WEBHOOK/MSGRAPH_WEBHOOK/FEISHU/WECOM/WECOM_CALLBACK/WEIXIN/BLUEBUBBLES/QQBOT/YUANBAOno line, and no entry for any other plugin-provided platform. So Platform("line") raises ValueError, the whole line: block is continued past, and gateway/platforms/base.py later reads channel_prompts from a config.extra that was never populated.

Fix Action

Fixed

Code Example

try:
    _plat = Platform(_entry.name)
except (ValueError, KeyError):
    continue
RAW_BUFFERClick to expand / collapse

Bug

The gateway's per-chat config bridging (gateway/config.py) only runs for platforms in the hard-coded Platform enum. A platform provided by a plugin (e.g. the bundled LINE adapter in plugins/platforms/line/) is silently skipped, so its top-level config block — including channel_prompts and every other bridged key — never reaches the adapter's extra. The platform still connects and serves traffic; it just loses all per-chat config bridging, with no error.

Root cause

The shared-key bridging builds its target list by converting config keys to Platform(...) and dropping anything that isn't an enum member:

try:
    _plat = Platform(_entry.name)
except (ValueError, KeyError):
    continue

Platform enumerates LOCAL/TELEGRAM/DISCORD/WHATSAPP/SLACK/SIGNAL/MATTERMOST/MATRIX/HOMEASSISTANT/EMAIL/SMS/DINGTALK/API_SERVER/WEBHOOK/MSGRAPH_WEBHOOK/FEISHU/WECOM/WECOM_CALLBACK/WEIXIN/BLUEBUBBLES/QQBOT/YUANBAOno line, and no entry for any other plugin-provided platform. So Platform("line") raises ValueError, the whole line: block is continued past, and gateway/platforms/base.py later reads channel_prompts from a config.extra that was never populated.

Reproduce

  1. With the bundled LINE platform plugin, configure a gateway profile with a top-level line: block containing channel_prompts: {"<chat_id>": "..."}.
  2. hermes --profile <p> gateway run — LINE connects and the webhook listens.
  3. Messages from that chat get the base system prompt only; the per-chat channel_prompt is never applied. (Same for any other key the bridging normally passes through, e.g. webhook_path did not apply either.)

Impact

  • channel_prompts (per-chat personas) and all other bridged per-chat/per-group config silently don't work for LINE — and for any future plugin-provided platform not added to the enum. Plugin platforms are second-class vs built-ins, with no signal that config was dropped.
  • Directly blocks per-group personas on native LINE (relevant to the active LINE work — many open PRs; tracking #16611).

Suggested fix (approach is maintainers' call)

Either (a) add LINE = "line" (and other plugin platforms) to the Platform enum and wire it into the bridging, or — cleaner long-term — (b) resolve plugin-provided platforms generically (via the plugin registry) in the bridging instead of gating on the core enum, so any registered platform plugin gets per-chat config bridging automatically.

Related: #27548 (plugin-platform discovery key namespacing — same "plugin platforms are second-class" theme, different mechanism); #16611 (LINE adapter tracker).


🤖 Filed with Claude Code after hitting this while wiring per-chat channel_prompts on the LINE adapter.

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