diff --git a/lib/research.js b/lib/research.js index 5695acd..16e88c2 100644 --- a/lib/research.js +++ b/lib/research.js @@ -380,7 +380,7 @@ async function runResearchJob(config, session, userMessageText, emit, db) { let dashboardSaved = false; const model = getModel(session.model || config.model); - const tools = model.vision ? [...TOOL_DEFINITIONS, SCREENSHOT_TOOL] : TOOL_DEFINITIONS; + const toolDefs = model.vision ? [...TOOL_DEFINITIONS, SCREENSHOT_TOOL] : TOOL_DEFINITIONS; const prices = model.prices; const handlers = { @@ -452,7 +452,7 @@ async function runResearchJob(config, session, userMessageText, emit, db) { for (let iter = 0; iter < MAX_ITERATIONS; iter++) { emit.progress('🤖', iter === 0 ? 'Analysiere Anfrage und plane Suche…' : 'Weitere Analyse…'); - const result = await chatCompletion(config, apiMessages, buildSystemPrompt(session, model), model, tools); + const result = await chatCompletion(config, apiMessages, buildSystemPrompt(session, model), model, toolDefs); trackUsage(result.usage); if (result.reasoning) emit.thinking(result.reasoning);