Skip to content

The agent that grows with you

feat(gateway): per-platform streaming config default for WeCom

wansui81aa4f18a8ae
diff --git a/gateway/display_config.py b/gateway/display_config.py
index e58e6e82b22..656a30d69ce 100644
--- a/gateway/display_config.py
+++ b/gateway/display_config.py
@@ -168,7 +168,12 @@ _PLATFORM_DEFAULTS: dict[str, dict[str, Any]] = {
"photon": _TIER_LOW,
"bluebubbles": _TIER_LOW,
"weixin": _TIER_LOW,
- "wecom": _TIER_LOW,
+ # WeCom is technically non-editable but exposes a native streaming
+ # transport (msgtype: "stream" via aibot_respond_msg) that the gateway
+ # consumer routes mid-stream content through. Enable streaming by default
+ # so the WeCom client renders the typing animation and cumulative content
+ # updates instead of a single one-shot markdown drop.
+ "wecom": {**_TIER_LOW, "streaming": True},
"wecom_callback": _TIER_LOW,
"dingtalk": _TIER_LOW,
diff --git a/hermes_cli/config.py b/hermes_cli/config.py
index ef939e154bc..a28c056d186 100644
--- a/hermes_cli/config.py
+++ b/hermes_cli/config.py
@@ -1014,6 +1014,8 @@ def _ensure_hermes_home_managed(home: Path):
from hermes_cli.config_defaults import DEFAULT_CONFIG, OPTIONAL_ENV_VARS # noqa: F401
+
+
# =============================================================================
# Config Migration System
# =============================================================================
diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.py
index c9bf9ad6e2a..10776127332 100644
--- a/hermes_cli/config_defaults.py
+++ b/hermes_cli/config_defaults.py
@@ -1569,6 +1569,10 @@ DEFAULT_CONFIG = {
"telegram": {"streaming": True},
"discord": {"streaming": False},
"slack": {"streaming": False},
+ # WeCom uses native streaming (msgtype: "stream") via
+ # aibot_respond_msg — opt in by default so the WeCom client
+ # renders the typing animation and cumulative content updates.
+ "wecom": {"streaming": True},
},
# Gateway runtime-metadata footer appended to the FINAL message of a turn
# (disabled by default to keep replies minimal). When enabled, renders
diff --git a/tests/gateway/test_display_config.py b/tests/gateway/test_display_config.py
index ccbfaade4d7..3a740589788 100644
--- a/tests/gateway/test_display_config.py
+++ b/tests/gateway/test_display_config.py
@@ -225,6 +225,31 @@ class TestStreamingPerPlatform:
}
assert resolve_display_setting(config, "telegram", "streaming") is False
+ def test_wecom_default_is_streaming_enabled(self):
+ """WeCom has a native streaming transport (msgtype: stream) so its
+ built-in default opts into streaming even though it sits in the
+ non-editable tier."""
+ from gateway.display_config import resolve_display_setting
+
+ assert resolve_display_setting({}, "wecom", "streaming") is True
+
+ def test_wecom_callback_default_remains_off(self):
+ """The legacy callback adapter has no stream protocol — keep off."""
+ from gateway.display_config import resolve_display_setting
+
+ assert resolve_display_setting({}, "wecom_callback", "streaming") is False
+
+ def test_wecom_user_can_still_disable_streaming(self):
+ """Per-platform override beats the built-in default."""
+ from gateway.display_config import resolve_display_setting
+
+ config = {
+ "display": {
+ "platforms": {"wecom": {"streaming": False}},
+ }
+ }
+ assert resolve_display_setting(config, "wecom", "streaming") is False
+
# ---------------------------------------------------------------------------
# cleanup_progress — opt-in deletion of temporary progress bubbles
diff --git a/tests/gateway/test_per_platform_streaming_defaults.py b/tests/gateway/test_per_platform_streaming_defaults.py
index d4f8e262d09..5e92ec66c46 100644
--- a/tests/gateway/test_per_platform_streaming_defaults.py
+++ b/tests/gateway/test_per_platform_streaming_defaults.py
@@ -17,5 +17,7 @@ def test_default_per_platform_streaming_flags():
assert plats["telegram"]["streaming"] is True
assert plats["discord"]["streaming"] is False
assert plats["slack"]["streaming"] is False
+ # WeCom: native streaming via msgtype: "stream" / aibot_respond_msg.
+ assert plats["wecom"]["streaming"] is True