From 17107047fefdbac000af0f1fb01ea9c15d26481a Mon Sep 17 00:00:00 2001 From: ImBenji Date: Wed, 22 Apr 2026 21:15:35 +0100 Subject: [PATCH] update augorWorker to use openRouter configuration and set llmModel in config --- config.json | 8 ++------ intelligence/augorWorker.js | 7 +++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/config.json b/config.json index d143027..5f3d777 100644 --- a/config.json +++ b/config.json @@ -1,11 +1,6 @@ { "duriin_db": "./archive.sqlite", "intelligence_db": "./intelligence.sqlite", - "llm": { - "baseUrl": "https://openrouter.ai/api/v1", - "model": "qwen/qwen3-235b-a22b-2507", - "apiKey": "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" - }, "workers": { "relevanceBatchSize": 50, "relevanceLoopDelayMs": 2000, @@ -38,7 +33,8 @@ "openRouter": { "enabled": true, "apiKey": "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", - "embeddingModel": "qwen/qwen3-embedding-8b" + "embeddingModel": "qwen/qwen3-embedding-8b", + "llmModel": "qwen/qwen3-235b-a22b-2507" }, "gdelt": { "source": "api", diff --git a/intelligence/augorWorker.js b/intelligence/augorWorker.js index 033949d..a1fe6b8 100644 --- a/intelligence/augorWorker.js +++ b/intelligence/augorWorker.js @@ -5,7 +5,7 @@ const { findMatchedCompaniesByEmbedding } = require("./embeddings"); async function runAugorWorker(archiveDb, intelligenceDb, config) { const loopDelay = config.workers?.augorLoopDelayMs ?? 1500; - const llmConfig = config.llm || {}; + const llmConfig = config.openRouter || {}; const getPending = intelligenceDb.prepare(` SELECT * FROM article_queue WHERE status = 'pending' LIMIT 1 @@ -165,13 +165,12 @@ Only include claims directly supported by the articles. Use empty arrays if noth async function callLlm(llmConfig, prompt) { const body = JSON.stringify({ - model: llmConfig.model || "gpt-4o-mini", + model: llmConfig.llmModel || llmConfig.model, messages: [{ role: "user", content: prompt }], temperature: 0.1, }); - const baseUrl = llmConfig.baseUrl || "https://api.openai.com"; - const url = new URL("/v1/chat/completions", baseUrl); + const url = new URL("https://openrouter.ai/api/v1/chat/completions"); const responseText = await httpPost(url, body, { "Content-Type": "application/json",