feat(runtime): 适配推理模式开关

This commit is contained in:
2026-07-06 02:03:03 +08:00
parent 797edeedf4
commit b7351f3b9b
10 changed files with 547 additions and 17 deletions
+1
View File
@@ -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"))