mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
fix[MCP]: enhance tool call handling in OpenAIProvider (#3642)
This commit is contained in:
parent
4119aa7b6a
commit
1df26412d0
@ -497,7 +497,7 @@ export default class OpenAIProvider extends BaseProvider {
|
||||
}
|
||||
}
|
||||
|
||||
if (finishReason === 'tool_calls') {
|
||||
if (finishReason === 'tool_calls' || (finishReason === 'stop' && Object.keys(final_tool_calls).length > 0)) {
|
||||
const toolCalls = Object.values(final_tool_calls).map(this.cleanToolCallArgs)
|
||||
console.log('start invoke tools', toolCalls)
|
||||
if (this.isZhipuTool(model)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user