From 4f15102e794cb53c88ab5584c02bded090e8280c Mon Sep 17 00:00:00 2001 From: akuuma <1919892171@qq.com> Date: Mon, 29 Dec 2025 23:59:55 +0800 Subject: [PATCH] perf(satori): increase websocket max message size to 10MB (#4238) * perf(satori): increase websocket max message size to 10MB Add max_size parameter to websocket connection to handle larger messages and prevent connection drops when receiving large payloads from Satori platform. * chore: ruff format --------- Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> --- astrbot/core/platform/sources/satori/satori_adapter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/astrbot/core/platform/sources/satori/satori_adapter.py b/astrbot/core/platform/sources/satori/satori_adapter.py index 46f9a4e0f..10912dc8e 100644 --- a/astrbot/core/platform/sources/satori/satori_adapter.py +++ b/astrbot/core/platform/sources/satori/satori_adapter.py @@ -142,7 +142,12 @@ class SatoriPlatformAdapter(Platform): raise ValueError(f"WebSocket URL必须以ws://或wss://开头: {self.endpoint}") try: - websocket = await connect(self.endpoint, additional_headers={}) + websocket = await connect( + self.endpoint, + additional_headers={}, + max_size=10 * 1024 * 1024, # 10MB + ) + self.ws = websocket await asyncio.sleep(0.1)