feat(runtime): 适配推理模式开关
This commit is contained in:
@@ -27,6 +27,7 @@ func (c OpenAIClient) Run(ctx context.Context, request Request) (Response, error
|
||||
body := cloneBody(request.Body)
|
||||
if request.Kind == "chat.completions" {
|
||||
body = NormalizeChatCompletionRequestBody(body)
|
||||
applyOpenAIChatReasoningParams(body, request.Candidate)
|
||||
}
|
||||
body["model"] = upstreamModelName(request.Candidate)
|
||||
stream := openAIEndpointSupportsStream(request.Kind) && (request.Stream || boolValue(body, "stream"))
|
||||
|
||||
Reference in New Issue
Block a user