feat: 为 gpt-5-mini 与 databricks-claude-sonnet-4 添加请求特殊处理

This commit is contained in:
chenchun
2025-11-18 11:36:18 +08:00
parent 9788b9182b
commit 9180799e4e

View File

@@ -76,12 +76,20 @@ namespace Yi.Framework.AiHub.Domain
{ {
options.Handles.Add(request => options.Handles.Add(request =>
{ {
if (request.Model == "gpt-5.1-chat") if (request.Model == "gpt-5.1-chat"||request.Model =="gpt-5-mini")
{ {
request.Temperature = null; request.Temperature = null;
request.TopP = null; request.TopP = null;
} }
}); });
options.Handles.Add(request =>
{
if (request.Model == "databricks-claude-sonnet-4")
{
request.PresencePenalty = null;
}
});
options.Handles.Add(request => options.Handles.Add(request =>
{ {
if (request.Model == "o1") if (request.Model == "o1")