From adf2890f6511d3a651d5ac72807dc025bee827e4 Mon Sep 17 00:00:00 2001 From: shaw Date: Wed, 7 Jan 2026 21:17:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4context=5Fmanagement?= =?UTF-8?q?=E4=BC=9A=E5=AF=BC=E8=87=B4=E5=8E=8B=E7=BC=A9=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E8=BF=98=E5=8E=9F=E9=80=BB=E8=BE=91=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/api.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/routes/api.js b/src/routes/api.js index c43ce90a..c38c4d6f 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -179,18 +179,18 @@ async function handleMessagesRequest(req, res) { const isStream = req.body.stream === true // 临时修复新版本客户端,删除context_management字段,避免报错 - if (req.body.context_management) { - delete req.body.context_management - } + // if (req.body.context_management) { + // delete req.body.context_management + // } // 遍历tools数组,删除input_examples字段 - if (req.body.tools && Array.isArray(req.body.tools)) { - req.body.tools.forEach((tool) => { - if (tool && typeof tool === 'object' && tool.input_examples) { - delete tool.input_examples - } - }) - } + // if (req.body.tools && Array.isArray(req.body.tools)) { + // req.body.tools.forEach((tool) => { + // if (tool && typeof tool === 'object' && tool.input_examples) { + // delete tool.input_examples + // } + // }) + // } logger.api( `🚀 Processing ${isStream ? 'stream' : 'non-stream'} request for key: ${req.apiKey.name}`