28e53d90fc
- 统一 OpenAI 兼容 /v1 中继 + 渠道/额度/令牌/流水 - 各领域包:relay 模型网关、model 数据层、controller 管理 API
10 lines
235 B
Go
10 lines
235 B
Go
package claude
|
|
|
|
func NormalizeCacheCreationSplit(totalTokens int, tokens5m int, tokens1h int) (int, int) {
|
|
remainder := totalTokens - tokens5m - tokens1h
|
|
if remainder < 0 {
|
|
remainder = 0
|
|
}
|
|
return tokens5m + remainder, tokens1h
|
|
}
|