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:
+1
-1
@@ -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))); } });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user