streamText Tool Invocation Failure

I found the problem, it was because of the tool-call format returned by the model. The tool-call format returned by the Qwen/QwQ-32B I used was as follows:

{
index: 0,
id: '0195ea05b2065bf6a2cf2b8a25e3716d',
type: 'function',
function: { name: 'add', arguments: '' }
}
// Subsequent chunks
{ index: 0, id: '', type: '', function: { arguments: ' {"' } }
{ index: 0, id: '', type: '', function: { arguments: 'a' } }
{ index: 0, id: '', type: '', function: { arguments: '":' } }
1 Like