Merge pull request #666 from Zhangstring/fix/context-management-compatibility

临时修复新版本客户端context_management字段兼容性问题
This commit is contained in:
Wesley Liddick
2025-11-14 22:27:08 -05:00
committed by GitHub

View File

@@ -103,6 +103,11 @@ async function handleMessagesRequest(req, res) {
// 检查是否为流式请求 // 检查是否为流式请求
const isStream = req.body.stream === true const isStream = req.body.stream === true
// 临时修复新版本客户端删除context_management字段避免报错
if (req.body.context_management) {
delete req.body.context_management
}
logger.api( logger.api(
`🚀 Processing ${isStream ? 'stream' : 'non-stream'} request for key: ${req.apiKey.name}` `🚀 Processing ${isStream ? 'stream' : 'non-stream'} request for key: ${req.apiKey.name}`
) )