fix: ensure sticky session failover triggers cache billing exemption

This commit is contained in:
erio
2026-02-09 06:57:07 +08:00
parent 681950dadd
commit 72b08f9cc5
2 changed files with 9 additions and 3 deletions

View File

@@ -422,7 +422,7 @@ func (h *GatewayHandler) GeminiV1BetaModels(c *gin.Context) {
var failoverErr *service.UpstreamFailoverError
if errors.As(err, &failoverErr) {
failedAccountIDs[account.ID] = struct{}{}
if failoverErr.ForceCacheBilling {
if needForceCacheBilling(hasBoundSession, failoverErr) {
forceCacheBilling = true
}
if switchCount >= maxAccountSwitches {