feat: add len variable for tier conditions and LLM prompt helper

This commit is contained in:
CaIon
2026-04-25 13:24:20 +08:00
parent a7c38ec851
commit f2f3410dcf
15 changed files with 393 additions and 47 deletions
+3 -2
View File
@@ -160,8 +160,9 @@ func PostWssConsumeQuota(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, mod
var tieredResult *billingexpr.TieredResult
tieredOk, tieredQuota, tieredRes := TryTieredSettle(relayInfo, billingexpr.TokenParams{
P: float64(usage.InputTokens),
C: float64(usage.OutputTokens),
P: float64(usage.InputTokens),
C: float64(usage.OutputTokens),
Len: float64(usage.InputTokens),
})
if tieredOk {
tieredResult = tieredRes