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
57d52586
authored
Mar 06, 2026
by
Calcium-Ion
Committed by
GitHub
Mar 06, 2026
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3141 from seefs001/fix/claude-thinking-top_p
fix: If top_p is not provided, Claude's logic will set to 1
parents
728607b8
3defef35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
relay/claude_handler.go
+0
-2
No files found.
relay/claude_handler.go
View file @
57d52586
...
...
@@ -59,7 +59,6 @@ func ClaudeHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *typ
Type
:
"adaptive"
,
}
request
.
OutputConfig
=
json
.
RawMessage
(
fmt
.
Sprintf
(
`{"effort":"%s"}`
,
effortLevel
))
request
.
TopP
=
common
.
GetPointer
[
float64
](
0
)
request
.
Temperature
=
common
.
GetPointer
[
float64
](
1.0
)
info
.
UpstreamModelName
=
request
.
Model
}
else
if
model_setting
.
GetClaudeSettings
()
.
ThinkingAdapterEnabled
&&
...
...
@@ -77,7 +76,6 @@ func ClaudeHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *typ
}
// TODO: 临时处理
// https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#important-considerations-when-using-extended-thinking
request
.
TopP
=
common
.
GetPointer
[
float64
](
0
)
request
.
Temperature
=
common
.
GetPointer
[
float64
](
1.0
)
}
if
!
model_setting
.
ShouldPreserveThinkingSuffix
(
info
.
OriginModelName
)
{
...
...
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