AI SDK auto calls tool on empty response! (I think!) It shouldn't be.

I am lately exploring AI SDK. Now the problem is, as of I know, AI can’t take in mid system instruction. So I prompt engineered it that on a specific message to consider that as system message and not to respond or empty response. Here I saw that it was calling tool on that specific message. I removed tool. Then it was empty. But when it was there it call the first tool available auto.

1 Like

@tweak-shank-factor-6 Am I understanding you correctly? Here’s what I think you’re saying:

If the AI generates an empty response, the first available tool is executed (if tools are enabled).

What AI SDK version are you using?