From bf485b16ae5662bc2c4520cecbd39d4a63160ae2 Mon Sep 17 00:00:00 2001 From: Marcos Date: Sat, 11 Jul 2026 22:30:36 +0000 Subject: [PATCH] =?UTF-8?q?fix(audit):=20aumentando=20timeouts=20de=20fetc?= =?UTF-8?q?h=20para=2010=20minutos=20para=20suportar=20modelos=20de=20raci?= =?UTF-8?q?oc=C3=ADnio=20profundo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/lib/audit/runner.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/lib/audit/runner.ts b/app/src/lib/audit/runner.ts index 140b5ca..cdbd50c 100644 --- a/app/src/lib/audit/runner.ts +++ b/app/src/lib/audit/runner.ts @@ -68,7 +68,7 @@ async function callOpenAI( 'Authorization': `Bearer ${config.apiKey}`, }, body: JSON.stringify(body), - }, 180000, signal); + }, 600000, signal); const data = await response.json() as { choices?: { message?: { content?: string } }[]; error?: { message?: string } }; if (data.error) throw new Error(`OpenAI error: ${data.error.message}`); const content = data.choices?.[0]?.message?.content; @@ -103,7 +103,7 @@ async function callAnthropic( 'anthropic-dangerous-direct-browser-access': 'true', }, body: JSON.stringify(body), - }, 180000, signal); + }, 600000, signal); const data = await response.json() as { content?: { text?: string }[]; error?: { type?: string; message?: string } }; if (data.error) throw new Error(`Anthropic error: ${data.error.message}`); const text = data.content?.[0]?.text; @@ -136,7 +136,7 @@ async function callMinimax( 'Authorization': `Bearer ${config.apiKey}`, }, body: JSON.stringify(body), - }, 180000, signal); + }, 600000, signal); const data = await response.json() as { choices?: { message?: { content?: string } }[]; error?: { message?: string } }; if (data.error) throw new Error(`MiniMax error: ${data.error.message}`); const content = data.choices?.[0]?.message?.content; @@ -170,7 +170,7 @@ async function callOpenRouter( 'X-Title': 'BrainWind NBR 6123', }, body: JSON.stringify(body), - }, 180000, signal); + }, 600000, signal); if (!response.ok) { const errText = await response.text(); throw new Error(`OpenRouter HTTP ${response.status}: ${errText}`); @@ -205,7 +205,7 @@ async function callOllama( method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), - }, 300000, signal); + }, 600000, signal); const data = await response.json() as { message?: { content?: string }; error?: string }; if (data.error) throw new Error(`Ollama error: ${data.error}`); if (!data.message?.content) throw new Error('Ollama returned empty response');