Commit 83068d11 by Chen011214 Committed by GitHub

fix(relay): fix Anthropic-compatible compatibility for GLM (avoid chunked encoding) (#5307)

parent 4a188dee
...@@ -155,6 +155,7 @@ func ClaudeHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *typ ...@@ -155,6 +155,7 @@ func ClaudeHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *typ
if err != nil { if err != nil {
return types.NewErrorWithStatusCode(err, types.ErrorCodeReadRequestBodyFailed, http.StatusBadRequest, types.ErrOptionWithSkipRetry()) return types.NewErrorWithStatusCode(err, types.ErrorCodeReadRequestBodyFailed, http.StatusBadRequest, types.ErrOptionWithSkipRetry())
} }
info.UpstreamRequestBodySize = storage.Size()
requestBody = common.ReaderOnly(storage) requestBody = common.ReaderOnly(storage)
} else { } else {
convertedRequest, err := adaptor.ConvertClaudeRequest(c, info, request) convertedRequest, err := adaptor.ConvertClaudeRequest(c, info, request)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment