Hello,
We have noticed an issue in the function calls received on our backend server URL.
If the same tool is being called multiple times, then different tool calls have the same toolCallId. Although the issue is that in our case, these tool calls had different parameters being passed, and getting different results.
I am attaching the message history which has the tool call ids for your reference.
For example, in the first tool call with the toolCallId - call_Q3zH68nXUIg4ZgrhLESRFJ6I in the call id- 7d6842f9-ffa9-4c22-ab53-8ef53bee3b80, we returned the result that record was not found..
Later in the same call, we used a different input to call the same tool again and the backend returned that record was found and the associated data for the record, but the toolCallId for this second tool call was also call_Q3zH68nXUIg4ZgrhLESRFJ6I. As a result, OpenAI keeps referencing the output of the first call and saying that the record was not found. OpenAI used the response of the first tool call ignoring the response in the new tool call which had the patient data.
Same issue happened in another call also with the callID 1b94c8a5-23ec-4dbd-ae0e-85e171af7d6c.
toolCallID was made to get_available_slots, the first time the result didn't have any morning slots with the toolCallId call_ZAORKvWJmcLb7FAEczuJZGcq. Later the same tool - get_available_slots - was called multiple times with different dates and the backend returned slots that were in the morning. But the toolCallId for those calls was also call_ZAORKvWJmcLb7FAEczuJZGcq. As a result OpenAI kept on saying there are no morning slots. *This resulted in the caller getting frustrated and hanging up. *
Kindly see if there it is a bug at VAPI or any thing that we need to fix.