Fix tool use argument handling in Claude Code provider (#8023)
The Claude Code CLI returns tool arguments as complete objects, but the StreamResponseHandler expects string chunks for streaming. This caused tool calls to fail with "missing parameter" errors because the object was being concatenated with a string, resulting in "[object Object]". This change stringifies the tool arguments in the Claude Code provider before yielding them, ensuring they are correctly parsed by the StreamResponseHandler.
This commit is contained in:
1 parent
1be314dfed
commit
644d06c487
2 files changed
+6
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Fix tool use argument handling in Claude Code provider to correctly stringify object arguments for the stream handler.
|
||||
@@ -121,7 +121,7 @@ export class ClaudeCodeHandler implements ApiHandler {
|
||||
function: {
|
||||
id: content.id,
|
||||
name: content.name,
|
||||
arguments: content.input,
|
||||
arguments: JSON.stringify(content.input),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user