perf(gmw-ai): cache-hit optimization — bare-key Qdrant upsert + hit_count bump

This commit is contained in:
asepharyana
2026-08-25 12:03:47 +07:00
parent ecbf2617e4
commit 796c6390ac
4 changed files with 70 additions and 8 deletions
@@ -182,7 +182,7 @@ export const configSchema = z
.number()
.int()
.positive()
.default(30),
.default(50),
// Qdrant vector store for the semantic moderation cache. When
// QDRANT_URL is set, embeddings are stored/searched there (Postgres
// embedding column remains as a legacy fallback).
@@ -276,7 +276,7 @@ export const configSchema = z
.number()
.int()
.positive()
.default(72),
.default(120),
AI_ANALYSIS_MAX_CONTEXT_TOKENS: z.coerce.number().positive().default(8000),
AI_ANALYSIS_MAX_TARGET_TOKENS: z.coerce.number().positive().default(14000),
AI_ANALYSIS_CONTEXT_MESSAGE_LIMIT: z.coerce