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
committed by shaw
parent 7c3257764c
commit 43cf7d3c28

View File

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