fix: 修复codex 客户端问题

This commit is contained in:
shaw
2025-11-06 20:24:32 +08:00
parent 80307f005e
commit 3525fe5697

View File

@@ -258,9 +258,9 @@ const handleResponses = async (req, res) => {
const isStream = req.body?.stream !== false // 默认为流式(兼容现有行为) const isStream = req.body?.stream !== false // 默认为流式(兼容现有行为)
// 判断是否为 Codex CLI 的请求 // 判断是否为 Codex CLI 的请求
const isCodexCLI = req.body?.instructions?.startsWith( const isCodexCLI =
'You are a coding agent running in the Codex CLI' req.body?.instructions?.startsWith('You are a coding agent running in the Codex CLI') ||
) req.body?.instructions?.startsWith('You are Codex')
// 如果不是 Codex CLI 请求,则进行适配 // 如果不是 Codex CLI 请求,则进行适配
if (!isCodexCLI) { if (!isCodexCLI) {