From db4e84f05774926060c2017f4e80cfe6d0d849a5 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Wed, 9 Sep 2026 21:38:16 +0700 Subject: [PATCH] =?UTF-8?q?fix(moderation):=20text=20batch=20timeout=2045s?= =?UTF-8?q?=E2=86=9275s=20=E2=80=94=20router=20text=20model=20regularly=20?= =?UTF-8?q?exceeds=2045s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The text model behind omniroute/9router consistently takes >45s on long-context batches. At 45s every such batch fell through to the individual-fallback queue which re-runs with its own timeout, then exhausted to ai_status=error. 75s keeps the bounded budget while letting the first-pass batch succeed. --- services/discord-gateway/src/shared/config/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/discord-gateway/src/shared/config/index.ts b/services/discord-gateway/src/shared/config/index.ts index 1a2f42d2..6477a94e 100644 --- a/services/discord-gateway/src/shared/config/index.ts +++ b/services/discord-gateway/src/shared/config/index.ts @@ -233,12 +233,16 @@ export const configSchema = z .default(120_000), // Text-only moderation batches are cheaper than media (no downloads / // vision pre-pass), so they get their own (shorter) timeout instead of - // being tied to the media budget. + // being tied to the media budget. Raised 45s→75s (2026-09-09): the text + // model behind the router regularly exceeds 45s on long context batches, + // and the individual-fallback re-run adds another full timeout cycle + // before marking the message exhausted. 75s is still bounded and keeps + // the status queue from piling up. AI_LLM_TEXT_ANALYSIS_TIMEOUT_MS: z.coerce .number() .int() .positive() - .default(45000), + .default(75_000), // Term glossary — per-word Wikipedia lookups (via SearXNG) for words the // LLM may not know (slang, jargon, regional language, foreign terms). // Definitions are cached (in-memory + Redis) so repeat lookups are fast.