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
3be7801d
authored
Jan 29, 2026
by
Calcium-Ion
Committed by
GitHub
Jan 29, 2026
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2765 from seefs001/fix/2763
fix: remove disable_parallel_tool_use if tool_choice=none
parents
f470310d
b063b259
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
relay/channel/claude/relay-claude.go
+6
-3
No files found.
relay/channel/claude/relay-claude.go
View file @
3be7801d
...
...
@@ -838,9 +838,12 @@ func mapToolChoice(toolChoice any, parallelToolCalls *bool) *dto.ClaudeToolChoic
}
}
// 设置 disable_parallel_tool_use
// 如果 parallel_tool_calls 为 true,则 disable_parallel_tool_use 为 false
claudeToolChoice
.
DisableParallelToolUse
=
!*
parallelToolCalls
// Anthropic schema: tool_choice.type=none does not accept extra fields.
// When tools are disabled, parallel_tool_calls is irrelevant, so we drop it.
if
claudeToolChoice
.
Type
!=
"none"
{
// 如果 parallel_tool_calls 为 true,则 disable_parallel_tool_use 为 false
claudeToolChoice
.
DisableParallelToolUse
=
!*
parallelToolCalls
}
}
return
claudeToolChoice
...
...
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