From c43aa6301d5a203106f9e2ce87de450dde9f1974 Mon Sep 17 00:00:00 2001 From: crazywriter1 Date: Sun, 17 May 2026 17:14:06 +0300 Subject: [PATCH] feat(gateway): per-channel model and system prompt overrides (Fixes #1955) - ChannelOverride + channel_overrides; session /model > channel > global - Thread/parent lookup; YAML bridge for discord.channel_overrides - Guard channel_overrides when config lacks platforms (test mocks) - Add sampiyonyus@gmail.com to AUTHOR_MAP --- gateway/run.py | 5 ++++- scripts/release.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gateway/run.py b/gateway/run.py index 4cdf1f0b939..37c84eca13c 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -2343,7 +2343,10 @@ def _get_channel_override( Looks up ``channel_overrides`` by ``chat_id``, then ``thread_id``, then ``parent_id`` (forum threads / child channels inherit the parent entry). """ - platform_config = config.platforms.get(platform) + platforms = getattr(config, "platforms", None) + if not platforms: + return None + platform_config = platforms.get(platform) if not platform_config or not platform_config.channel_overrides: return None overrides = platform_config.channel_overrides diff --git a/scripts/release.py b/scripts/release.py index 901a5480709..4d7f42cc457 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -918,6 +918,7 @@ AUTHOR_MAP = { "fr@tecompanytea.com": "ifrederico", "cdanis@gmail.com": "cdanis", "samherring99@gmail.com": "samherring99", + "sampiyonyus@gmail.com": "crazywriter1", "desaiaum08@gmail.com": "Aum08Desai", "shannon.sands.1979@gmail.com": "shannonsands", "shannon@nousresearch.com": "shannonsands",