feat: remove OpenAI moderation configuration and update AI analysis logic

This commit is contained in:
MythEclipse
2026-05-14 02:44:26 +07:00
parent be6c9f8132
commit 6e203604ec
4 changed files with 62 additions and 62 deletions
-7
View File
@@ -48,13 +48,6 @@ const configSchema = z.object({
AI_ANALYSIS_TIMEOUT_MS: z.coerce.number().positive().default(30000),
}).superRefine((value, ctx) => {
if (!value.AI_ANALYSIS_ENABLED) return;
if (!value.OPENAI_MODERATION_API_KEY) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["OPENAI_MODERATION_API_KEY"],
message: "OPENAI_MODERATION_API_KEY is required when AI_ANALYSIS_ENABLED=true",
});
}
if (!value.AI_LLM_API_KEY) {
ctx.addIssue({
code: z.ZodIssueCode.custom,