fix: openai 格式请求 claude 没计费 create cache token

This commit is contained in:
Xyfacai
2025-09-10 15:30:23 +08:00
parent 3f9698bb47
commit fcdfd027cd
10 changed files with 31 additions and 13 deletions

View File

@@ -58,7 +58,7 @@ func EmbeddingHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *
if resp != nil {
httpResp = resp.(*http.Response)
if httpResp.StatusCode != http.StatusOK {
newAPIError = service.RelayErrorHandler(httpResp, false)
newAPIError = service.RelayErrorHandler(c.Request.Context(), httpResp, false)
// reset status code 重置状态码
service.ResetStatusCode(newAPIError, statusCodeMappingStr)
return newAPIError