diff --git a/server.js b/server.js index 46dd6b1..cda36e9 100644 --- a/server.js +++ b/server.js @@ -470,7 +470,7 @@ async function handleChat(req, res) { const r = await fetch('https://openrouter.ai/api/v1/chat/completions', { method: 'POST', signal: ctrl.signal, headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json', 'HTTP-Referer': 'https://rmcircle.team', 'X-Title': 'RM Circle Team Help' }, - body: JSON.stringify({ model: OPENROUTER_MODEL, max_tokens: 350, temperature: 0.3, messages: [{ role: 'system', content: chatSystemPrompt() }, ...msgs] }) + body: JSON.stringify({ model: OPENROUTER_MODEL, reasoning: { enabled: false }, max_tokens: 350, temperature: 0.3, messages: [{ role: 'system', content: chatSystemPrompt() }, ...msgs] }) }); clearTimeout(timer); if (!r.ok) { console.error('openrouter status', r.status); return json(res, 200, { fallback: true }); } @@ -599,7 +599,7 @@ async function handleTranslate(req,res){ const r=await fetch('https://openrouter.ai/api/v1/chat/completions',{ method:'POST',signal:ctrl.signal, headers:{'Authorization':`Bearer ${apiKey}`,'Content-Type':'application/json','HTTP-Referer':'https://rmcircle.team','X-Title':'RM Circle Translate'}, - body:JSON.stringify({model:OPENROUTER_MODEL,max_tokens:6000,temperature:0,messages:[ + body:JSON.stringify({model:OPENROUTER_MODEL,reasoning:{enabled:false},max_tokens:6000,temperature:0,messages:[ {role:'system',content:`You translate website UI strings from English to ${TR_LANG_NAMES[tl]}. The input is numbered items, each preceded by a line @@N@@. Reply with the SAME @@N@@ marker lines, each followed by that item's translation (multi-line items keep their line breaks). Output nothing except markers and translations — no preamble, no code fences. Keep these words untranslated wherever they appear: Scintilla, Ascensus, Fabrica, Culmen, Apex, Fastigium, Vertex, Corona, POL, Polygon, RM Circle, MoonPay, MetaMask, Trust Wallet. Keep numbers, #ids, emoji and punctuation intact. Natural, friendly tone.`}, {role:'user',content:miss.map((i,j)=>`@@${j+1}@@\n${texts[i]}`).join('\n')} ]})