fix: remove dead OpenAI client instance and fix ChatCompletion type imports
- Delete unused OpenAI WAF bypass client block (60+ lines) from both monolith and microservice llmModerationClient.ts - Replace OpenAI.Chat.Completions.ChatCompletion with type-only ChatCompletion import from openai/resources/chat/completions - All LLM chat calls already go through centralized llmClient.ts helper Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
71de941470
commit
363676b608
@@ -580,7 +580,7 @@ async function callModerationLLM(
|
|||||||
label: string,
|
label: string,
|
||||||
): Promise<{
|
): Promise<{
|
||||||
results: AnalysisResult[];
|
results: AnalysisResult[];
|
||||||
raw: OpenAI.Chat.Completions.ChatCompletion | null;
|
raw: ChatCompletion | null;
|
||||||
}> {
|
}> {
|
||||||
const state: RetryState = {
|
const state: RetryState = {
|
||||||
lastParseError: null,
|
lastParseError: null,
|
||||||
@@ -588,7 +588,7 @@ async function callModerationLLM(
|
|||||||
};
|
};
|
||||||
|
|
||||||
let parsed: AnalysisResult[];
|
let parsed: AnalysisResult[];
|
||||||
let result: OpenAI.Chat.Completions.ChatCompletion | null = null;
|
let result: ChatCompletion | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const analysis = await retryWithBackoff(
|
const analysis = await retryWithBackoff(
|
||||||
|
|||||||
Reference in New Issue
Block a user