diff --git a/common/model-ratio.go b/common/model-ratio.go index 0cfd82b1d..a0fb33833 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -54,8 +54,8 @@ var defaultModelRatio = map[string]float64{ "o1-2024-12-17": 7.5, "o1-preview": 7.5, "o1-preview-2024-09-12": 7.5, - "o1-mini": 1.5, - "o1-mini-2024-09-12": 1.5, + "o1-mini": 0.55, + "o1-mini-2024-09-12": 0.55, "o3-mini": 0.55, "o3-mini-2025-01-31": 0.55, "gpt-4o-mini": 0.075, diff --git a/controller/channel-test.go b/controller/channel-test.go index 5f9c990f1..10bf84b4e 100644 --- a/controller/channel-test.go +++ b/controller/channel-test.go @@ -156,10 +156,10 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest { Model: "", // this will be set later Stream: false, } - if strings.HasPrefix(model, "o1") { + if strings.HasPrefix(model, "o1") || strings.HasPrefix(model, "o3") { testRequest.MaxCompletionTokens = 10 } else if strings.HasPrefix(model, "gemini-2.0-flash-thinking") { - testRequest.MaxTokens = 2 + testRequest.MaxTokens = 10 } else { testRequest.MaxTokens = 1 } diff --git a/relay/channel/openai/adaptor.go b/relay/channel/openai/adaptor.go index 05ce227fc..4557a6f13 100644 --- a/relay/channel/openai/adaptor.go +++ b/relay/channel/openai/adaptor.go @@ -114,6 +114,9 @@ func (a *Adaptor) ConvertRequest(c *gin.Context, info *relaycommon.RelayInfo, re request.MaxCompletionTokens = request.MaxTokens request.MaxTokens = 0 } + if strings.HasPrefix(request.Model, "o3") { + request.Temperature = nil + } } if request.Model == "o1" || request.Model == "o1-2024-12-17" || strings.HasPrefix(request.Model, "o3") { //修改第一个Message的内容,将system改为developer