chore(ai-moderation): increase llm client timeout and add test script

- Increase OpenAI client timeout from 15s to 60s to handle high-latency models
- Add `test-llm.js` for manual verification of LLM connectivity and response times
This commit is contained in:
MythEclipse
2026-06-05 19:08:57 +07:00
parent 049582504e
commit bdf80b081c
2 changed files with 61 additions and 1 deletions
@@ -27,7 +27,7 @@ function getClient(): OpenAI | null {
apiKey: config.AI_LLM_API_KEY,
baseURL: config.AI_LLM_BASE_URL,
maxRetries: 0,
timeout: 15_000,
timeout: 60_000, // Diperbesar dari 15s ke 60s untuk mengakomodasi model delay tinggi
});
}
return openaiClient;