fix: 修复会话窗口使用统计问题

This commit is contained in:
shaw
2025-08-31 20:14:12 +08:00
parent 07e9bc1137
commit 9a46310238
4 changed files with 66 additions and 9 deletions

View File

@@ -1524,7 +1524,10 @@ router.get('/claude-accounts', authenticateAdmin, async (req, res) => {
cache_read_input_tokens: usage.cacheReadTokens
}
logger.debug(`💰 Calculating cost for model ${modelName}:`, JSON.stringify(usageData))
const costResult = CostCalculator.calculateCost(usageData, modelName)
logger.debug(`💰 Cost result for ${modelName}: total=${costResult.costs.total}`)
modelCosts[modelName] = {
...usage,
cost: costResult.costs.total