Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cf243588
authored
Dec 08, 2025
by
Seefs
Committed by
GitHub
Dec 08, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2229 from HynoR/chore/v1
fix: Set default to unsupported value for gpt-5 model series requests
parents
0b896d4f
601d257b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
relay/channel/openai/adaptor.go
+3
-2
No files found.
relay/channel/openai/adaptor.go
View file @
cf243588
...
@@ -306,10 +306,11 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn
...
@@ -306,10 +306,11 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn
request
.
Temperature
=
nil
request
.
Temperature
=
nil
}
}
// gpt-5系列模型适配 归零不再支持的参数
if
strings
.
HasPrefix
(
info
.
UpstreamModelName
,
"gpt-5"
)
{
if
strings
.
HasPrefix
(
info
.
UpstreamModelName
,
"gpt-5"
)
{
if
info
.
UpstreamModelName
!=
"gpt-5-chat-latest"
{
request
.
Temperature
=
nil
request
.
Temperature
=
nil
}
request
.
TopP
=
0
// oai 的 top_p 默认值是 1.0,但是为了 omitempty 属性直接不传,这里显式设置为 0
request
.
LogProbs
=
false
}
}
// 转换模型推理力度后缀
// 转换模型推理力度后缀
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment