Revert "fix(gateway): 修复 base_url 包含 /chat/completions 时路径拼接错误"
This reverts commit 7fdc25df3c.
This commit is contained in:
@@ -738,9 +738,6 @@ func (s *OpenAIGatewayService) buildUpstreamRequest(ctx context.Context, c *gin.
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Remove /chat/completions suffix if present, then add /responses
|
||||
validatedURL = strings.TrimSuffix(validatedURL, "/")
|
||||
validatedURL = strings.TrimSuffix(validatedURL, "/chat/completions")
|
||||
targetURL = validatedURL + "/responses"
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user