I ran into the exact same issue and couldn’t find a solution for a long time. But now I finally found the solution in this thread: Tool calling with OpenAI API not working. The answer by Hugo_Lebegue solved it for me. You have to provide an arbitrary id in the tool call.