fix(ai): default tool call arguments

fixes #1065
This commit is contained in:
Mario Zechner 2026-01-30 01:13:16 +01:00
parent 098f396cf3
commit af813f9048
2 changed files with 4 additions and 4 deletions

View file

@ -233,7 +233,7 @@ export const streamAnthropic: StreamFunction<"anthropic-messages", AnthropicOpti
name: isOAuthToken
? fromClaudeCodeName(event.content_block.name, context.tools)
: event.content_block.name,
arguments: event.content_block.input as Record<string, any>,
arguments: (event.content_block.input as Record<string, any>) ?? {},
partialJson: "",
index: event.index,
};
@ -619,7 +619,7 @@ function convertMessages(
type: "tool_use",
id: block.id,
name: isOAuthToken ? toClaudeCodeName(block.name) : block.name,
input: block.arguments,
input: block.arguments ?? {},
});
}
}