From 25b9ab0c3753b842a76d88ff1ebb1deff14de688 Mon Sep 17 00:00:00 2001 From: jaakko Date: Tue, 14 Apr 2026 08:45:06 +0300 Subject: [PATCH] =?UTF-8?q?Benchmark:=20k=C3=A4yt=C3=A4=20thinking-kentt?= =?UTF-8?q?=C3=A4=C3=A4=20fallbackina=20jos=20content=20tyhj=C3=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qwen3.5 palauttaa vastauksen thinking-kentässä kun content on tyhjä. Lisätty debug-logi thinking-malleille. --- network-poc/tests/model-benchmark.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/network-poc/tests/model-benchmark.mjs b/network-poc/tests/model-benchmark.mjs index feedba7..1ba2768 100644 --- a/network-poc/tests/model-benchmark.mjs +++ b/network-poc/tests/model-benchmark.mjs @@ -81,8 +81,10 @@ async function ollamaChat(model, prompt, systemPrompt, maxTokens = 2048) { const elapsed = Date.now() - start; // Ollama: jotkin mallit (qwen3.5) palauttavat ajattelun erillisessä thinking-kentässä const rawContent = (data.message?.content || '').trim(); - const text = stripThinking(rawContent); + const thinking = (data.message?.thinking || '').trim(); + const text = stripThinking(rawContent || thinking); const evalCount = data.eval_count || 0; + if (!rawContent && thinking) console.log(` ⚠ thinking-malli: ${thinking.length} merkkiä ajattelua, content tyhjä`); const evalDurationNs = data.eval_duration || 1; const tokPerSec = evalCount / (evalDurationNs / 1e9); return { text, tokens: evalCount, durationMs: elapsed, tokPerSec };