feat: 添加对 ephemeral 5m 和 1h 令牌的支持,优化费用计算逻辑

This commit is contained in:
sczheng189
2026-02-23 21:20:18 +08:00
parent 5376428dd9
commit bfae62bfeb
7 changed files with 331 additions and 18 deletions

View File

@@ -1599,6 +1599,8 @@ class ApiKeyService {
outputTokens,
cacheCreateTokens,
cacheReadTokens,
0, // ephemeral5mTokens - recordUsage 不含详细缓存数据
0, // ephemeral1hTokens - recordUsage 不含详细缓存数据
model,
isLongContextRequest
)
@@ -1834,6 +1836,8 @@ class ApiKeyService {
outputTokens,
cacheCreateTokens,
cacheReadTokens,
ephemeral5mTokens,
ephemeral1hTokens,
model,
costInfo.isLongContextRequest || false
)