AI calls: reasoning off (deepseek-v4-flash began thinking by default and used the whole max_tokens, so chatbot and Copy Engine answers came back empty)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-16 05:30:23 -05:00
parent 0db7c94728
commit d0cc45eadb
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -216,6 +216,7 @@ function askAI(message, historyText) {
return new Promise((resolve, reject) => {
const body = JSON.stringify({
model: MODEL,
reasoning: { enabled: false }, // 2026-10-16: deepseek-v4-flash now thinks by default and spent the whole max_tokens on it (empty answers)
max_tokens: 300,
messages: [
{ role: 'system', content: systemPrompt() },
+1 -1
View File
@@ -76,7 +76,7 @@ function buildMessages(kind, brief, angle, member) {
}
function complete(messages) {
return new Promise((resolve, reject) => {
const body = JSON.stringify({ model: MODEL, max_tokens: 500, temperature: 0.8, messages });
const body = JSON.stringify({ model: MODEL, reasoning: { enabled: false }, max_tokens: 500, temperature: 0.8, messages });
const req = https.request({ hostname: 'openrouter.ai', path: '/api/v1/chat/completions', method: 'POST', headers: { Authorization: 'Bearer ' + key(), 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(body) }, timeout: 45000 }, res => {
let d = ''; res.on('data', c => d += c); res.on('end', () => { try { resolve(JSON.parse(d).choices[0].message.content.trim()); } catch (e) { reject(new Error('engine ' + res.statusCode + ': ' + d.slice(0, 120))); } });
});