Restrict temperature override for unsupported models (o* and gpt-5*).

This commit is contained in:
2025-08-08 10:37:09 -04:00
parent 07a04d08a9
commit 5fa7c7e5c7

View File

@@ -50,8 +50,13 @@ func (o openaiImpl) newRequestToOpenAIRequest(request Request) openai.ChatComple
}
if request.Temperature != nil {
// these are known models that do not support custom temperatures
// all the o* models
// gpt-5* models
if !strings.HasPrefix(o.model, "o") && strings.HasPrefix(o.model, "gpt-5") {
res.Temperature = openai.Float(*request.Temperature)
}
}
return res
}