mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 17:54:50 +00:00
fix: 修复API统计和OpenAI路由问题
This commit is contained in:
@@ -562,8 +562,14 @@ router.post('/api/batch-stats', async (req, res) => {
|
||||
name: stats.name,
|
||||
isActive: true,
|
||||
usage: stats.usage,
|
||||
dailyUsage: stats.dailyStats,
|
||||
monthlyUsage: stats.monthlyStats
|
||||
dailyUsage: {
|
||||
...stats.dailyStats,
|
||||
formattedCost: CostCalculator.formatCost(stats.dailyStats.cost || 0)
|
||||
},
|
||||
monthlyUsage: {
|
||||
...stats.monthlyStats,
|
||||
formattedCost: CostCalculator.formatCost(stats.monthlyStats.cost || 0)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -153,7 +153,7 @@ router.post('/responses', authenticateApiKey, async (req, res) => {
|
||||
headers['host'] = 'chatgpt.com'
|
||||
headers['accept'] = isStream ? 'text/event-stream' : 'application/json'
|
||||
headers['content-type'] = 'application/json'
|
||||
req.body['store'] = false
|
||||
req.body['store'] = true
|
||||
|
||||
// 创建代理 agent
|
||||
const proxyAgent = createProxyAgent(proxy)
|
||||
|
||||
Reference in New Issue
Block a user