mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 04:03:18 +00:00
fix max_output_token
This commit is contained in:
@@ -323,6 +323,10 @@ func ChatCompletionsRequestToResponsesRequest(req *dto.GeneralOpenAIRequest) (*d
|
||||
if req.MaxCompletionTokens > maxOutputTokens {
|
||||
maxOutputTokens = req.MaxCompletionTokens
|
||||
}
|
||||
// OpenAI Responses API rejects max_output_tokens < 16 when explicitly provided.
|
||||
if maxOutputTokens > 0 && maxOutputTokens < 16 {
|
||||
maxOutputTokens = 16
|
||||
}
|
||||
|
||||
var topP *float64
|
||||
if req.TopP != 0 {
|
||||
|
||||
Reference in New Issue
Block a user