I noticed in the Vapi SDK, we can pass in a key called "variableValues" on the Vapi instance instantiation but the value of these keys seem to be obfuscated /modified once Vapi recieves them and tries to use that value in tool calls. This is a major bug for my use case as it allows me to differentiate among user chat histories. I noticed when I told Vapi to pass this variableValue to the tool calls as a param, it would modify slight characters in the string value.
These are some failed logs I found on my server when trying to make tool calls with Vapi. As you can see, it slightly obfuscates the string. Failed requests (10:41:50 - 10:42:32):
- ❌ Request 1: 2536d197-fc73-497d-8c8a-e6755bfe404 (corrupted: d199 → d197, missing b)
- ❌ Request 2: 2536d199-fc73-497d-8c8a-e67555bfe404 (corrupted: bbf → 55b, 4f missing)
This is a CONSISTENT issue, and I've isolated it to be only occurring when the voice agent is required to use a variableValue to pass into a tool call. I have a text mode with a local LLM and it does not experience the same issue.
Is there a patch to fix this soon or can your team look into this asap? It is a fairly critical bug, as this allows (not only myself but other users too) me to allow the Vapi instance to use tool calls and pass params in which is vital to the functionality of my app. Thank you.