fix: 修复Gemini v1beta非流式响应数据结构问题

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zjpyb
2025-08-28 03:04:52 +08:00
parent fb57cfd293
commit 79c7d1d116

View File

@@ -586,7 +586,7 @@ async function handleGenerateContent(req, res) {
}
}
res.json(response)
res.json(version === 'v1beta' ? response.response : response)
} catch (error) {
const version = req.path.includes('v1beta') ? 'v1beta' : 'v1internal'
// 打印详细的错误信息