ToolCallId being repeated across different functio...
# support
r
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.
v
@riteshchopra Hello, Thank you for bringing this issue to our attention. It seems there might be a problem with the toolCallId not being unique for each separate call, which is causing confusion when referencing the results of different calls. The toolCallId should indeed be unique for each call to ensure that the responses are correctly matched to the corresponding requests. To address this issue, we will need to investigate the cause of the non-unique toolCallId generation. It could be a bug on our end or a misconfiguration in the way the tool is being called. We will look into the message history you've provided and identify where the problem lies. In the meantime, please ensure that on your end, each tool call is supposed to generate a new, unique toolCallId. If you are already doing this and the issue persists, it is likely on our side, and we will work to resolve it as quickly as possible. If you have any additional information or specific logs that could help us pinpoint the issue, please share them. We are committed to resolving this promptly to prevent any further inconvenience to your callers. Thank you for your patience and cooperation.
You can continue this conversation by mentioning me in the message.
r
When we call a different tool, a new toolcallId is used. Looks like VAPI is doing some caching, which is resulting in this bug
@Sahil
updated the files
@Sahil Checking on this, this is an urgent issue. All function calls are impacted
s
Marking it as complete and ping me whenever you are free tomorrow we will discuss this during a call.
r
@Sahil - Please reopen this issue. As discussed in the call the problem is still there, and this issue is very annoying for our callers
Never mind, I was able to mark it Unresolved
s
We are looking into that call_id
I will keep you posted about it.
r
Thanks!
2 Views