fix: scope reasoning_effort=none to OpenAI provider only (Xiaomi rejects 'none')
This commit is contained in:
@@ -57,6 +57,9 @@ func (p *OpenAIProvider) ChatCompletion(ctx context.Context, req *models.Unified
|
||||
delete(body, "max_tokens")
|
||||
body["max_completion_tokens"] = maxTokens
|
||||
}
|
||||
if len(req.Tools) > 0 {
|
||||
body["reasoning_effort"] = "none"
|
||||
}
|
||||
}
|
||||
|
||||
resp, err := p.client.R().
|
||||
@@ -169,6 +172,9 @@ func (p *OpenAIProvider) ChatCompletionStream(ctx context.Context, req *models.U
|
||||
delete(body, "max_tokens")
|
||||
body["max_completion_tokens"] = maxTokens
|
||||
}
|
||||
if len(req.Tools) > 0 {
|
||||
body["reasoning_effort"] = "none"
|
||||
}
|
||||
}
|
||||
|
||||
resp, err := p.client.R().
|
||||
|
||||
Reference in New Issue
Block a user