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
b063b259
authored
Jan 28, 2026
by
Seefs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: disable_parallel_tool_use parameter should be removed for tool_choice=none:
parent
d4d395e1
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 @
b063b259
...
@@ -838,9 +838,12 @@ func mapToolChoice(toolChoice any, parallelToolCalls *bool) *dto.ClaudeToolChoic
...
@@ -838,9 +838,12 @@ func mapToolChoice(toolChoice any, parallelToolCalls *bool) *dto.ClaudeToolChoic
}
}
}
}
// 设置 disable_parallel_tool_use
// Anthropic schema: tool_choice.type=none does not accept extra fields.
// 如果 parallel_tool_calls 为 true,则 disable_parallel_tool_use 为 false
// When tools are disabled, parallel_tool_calls is irrelevant, so we drop it.
claudeToolChoice
.
DisableParallelToolUse
=
!*
parallelToolCalls
if
claudeToolChoice
.
Type
!=
"none"
{
// 如果 parallel_tool_calls 为 true,则 disable_parallel_tool_use 为 false
claudeToolChoice
.
DisableParallelToolUse
=
!*
parallelToolCalls
}
}
}
return
claudeToolChoice
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