refactor: update function signatures to include context and improve file handling #1599

This commit is contained in:
CaIon
2025-08-15 18:40:54 +08:00
parent b57e97d2a1
commit 0bb43aa464
18 changed files with 105 additions and 52 deletions

View File

@@ -133,6 +133,8 @@ func Relay(c *gin.Context, relayFormat types.RelayFormat) {
return
}
common.SetContextKey(c, constant.ContextKeyTokenCountMeta, meta)
preConsumedQuota, newAPIError := service.PreConsumeQuota(c, priceData.ShouldPreConsumedQuota, relayInfo)
if newAPIError != nil {
return