fix(discord-gateway): require LLM API key only when AI analysis is enabled

This commit is contained in:
MythEclipse
2026-06-02 21:46:15 +07:00
parent 831bb692d9
commit 1e1fbb4583
2 changed files with 4 additions and 4 deletions
@@ -158,9 +158,9 @@ let lastError: string | null = null;
let moderationClient: Client | undefined;
// Batch circuit breaker
let consecutiveErrors = 0;
const conversationConsecutiveErrors = new Map<string, number>();
const MAX_CONSECUTIVE_ERRORS = 5;
let globalCooldownUntil = 0;
const CONVERSATION_CB_COOLDOWN_MS = 60000;
// ---------------------------------------------------------------------------
// Individual fallback queue — runs PARALLEL to the batch pipeline.