diff --git a/gateway/config.py b/gateway/config.py index 8c467196e3b5..d6ca84690266 100644 --- a/gateway/config.py +++ b/gateway/config.py @@ -1856,8 +1856,15 @@ def _enable_from_env(platform: Platform) -> PlatformConfig: if feishu_app_id and feishu_app_secret: if Platform.FEISHU not in config.platforms: config.platforms[Platform.FEISHU] = PlatformConfig() - config.platforms[Platform.FEISHU].enabled = True - config.platforms[Platform.FEISHU].extra.update({ + # Respect explicit enabled: false in config.yaml — don't force-enable + # when the user intentionally disabled the platform (mirrors Slack at L1596). + # _enabled_explicit is set in _merge_platform_map when "enabled" appears in + # a top-level platform YAML entry or platforms. map entry. + feishu_config = config.platforms[Platform.FEISHU] + enabled_was_explicit = bool(feishu_config.extra.get("_enabled_explicit", False)) + if not feishu_config.enabled and not enabled_was_explicit: + feishu_config.enabled = True + feishu_config.extra.update({ "app_id": feishu_app_id, "app_secret": feishu_app_secret, "domain": getenv("FEISHU_DOMAIN", "feishu"),