fix(audit): trim api key before sending to avoid missing auth header error

This commit is contained in:
2026-07-11 21:09:12 +00:00
parent 830091564c
commit 513f9f86d4
+1
View File
@@ -28,6 +28,7 @@ export async function runLLMAudit(
userPrompt: string,
onProgress?: (msg: string) => void,
): Promise<string> {
config = { ...config, apiKey: config.apiKey?.trim() || '' };
if (config.provider === 'openai') {
return callOpenAI(config, systemPrompt, userPrompt, onProgress);
} else if (config.provider === 'anthropic') {