Merge pull request #322 from xlx0852/main

fix: 混合渠道警告确认框和过滤 prompt_cache_retention 参数
This commit is contained in:
Wesley Liddick
2026-02-03 15:13:10 +08:00
committed by GitHub
5 changed files with 144 additions and 17 deletions

View File

@@ -845,6 +845,12 @@ func (s *OpenAIGatewayService) Forward(ctx context.Context, c *gin.Context, acco
bodyModified = true
}
}
// Remove prompt_cache_retention (not supported by upstream OpenAI API)
if _, has := reqBody["prompt_cache_retention"]; has {
delete(reqBody, "prompt_cache_retention")
bodyModified = true
}
}
// Re-serialize body only if modified