refactor: simplify AI moderation pipeline to Primary AI only, fix stickerCache executeGet

- Remove Groq and NVIDIA fallback from text moderation pipeline
- Remove GROQ_API_KEY, GROQ_MODERATION_*, NVIDIA_NEMOTRON_* config vars
- Update source enum: remove 'groq' and 'nvidia' from cache/schema types
- Rewrite indonesianTextNormalizer to use Primary AI only (no fallback chain)
- Rewrite remote test to test Primary AI only
- Fix stickerCache executeGet missing empty params array

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MythEclipse
2026-06-02 17:25:55 +07:00
co-authored by Claude Opus 4.8
parent 049fd49737
commit 1bc0b7c7bb
3 changed files with 14 additions and 30 deletions
@@ -7,14 +7,10 @@ import {
normalizeDiscordCustomEmoji,
} from "../../src/moderation/indonesianTextNormalizer";
const originalNemotronKey = config.NVIDIA_NEMOTRON_API_KEY;
const originalPrimaryAiKey = config.AI_LLM_API_KEY;
const originalGroqKey = config.GROQ_API_KEY;
function disableRemoteModeration(): void {
config.NVIDIA_NEMOTRON_API_KEY = undefined;
config.AI_LLM_API_KEY = undefined;
config.GROQ_API_KEY = undefined;
}
disableRemoteModeration();
@@ -24,9 +20,7 @@ afterEach(() => {
});
afterAll(() => {
config.NVIDIA_NEMOTRON_API_KEY = originalNemotronKey;
config.AI_LLM_API_KEY = originalPrimaryAiKey;
config.GROQ_API_KEY = originalGroqKey;
});
describe("normalizeDiscordCustomEmoji", () => {