Tool parameter length limit?
# support
d
Some of my tools that contains a specific parameter which argument input is pretty long is now constantly failing. The agent either construct an empty argument array or truncate this argument when sending the tool, causing constant failure. This was not happening before a few days ago, and when removing this parameter, the tools are constructed correctly. I've been wondering if something changed regarding that?
v
Hi there! 👋 I understand you're experiencing issues with tool parameters being truncated or incorrectly constructed when using long arguments. Based on the documentation I've found, there have been some recent changes to the Vapi platform that might be related to your issue: 1. There was an update to how
ToolCall
parameters are structured as of January 29, 2025. The properties
tool
and
toolBody
were replaced with a new
function
property that includes
id
and
function
details [Changelog](https://docs.vapi.ai/changelog/2025/1/29). 2. I've also found that there are known bugs in the Vapi UI related to parameter handling, with users reporting issues specifically with function calls that occasionally result in incorrect execution, possibly due to long or complex input arguments [Discord](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336339138898694184). While I couldn't find information about a very specific change in the past few days that would directly explain the parameter truncation you're experiencing, these known issues with parameter handling might be related to your problem. Unfortunately, I wasn't able to find the exact maximum allowed length for tool parameters in the Vapi platform, which might help diagnose your issue. Have you tried working with the API directly instead of the UI? Some users have reported this as a workaround for parameter-related issues. Sources: - [Changelog January 29, 2025](https://docs.vapi.ai/changelog/2025/1/29) - [Discord](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336339138898694184)
s
@Daniel F. nothing has been changed can you share the working and failing call IDs so I can do the comparison and see what could have gone wrong for you. FYI: I am aware of mutliple tickets owned by you for the same context. I suggest to let's continue over here...
d
Thanks @Shubham Bajaj I tried changing the reschedule tool to strict but same result. Here is the failed CallID f2cccebd-4c60-46db-bf7b-603dbc14717a
@Shubham Bajaj Here is an example of a successfull call with correct tool exectution: ddd622ed-6c96-4708-bc6d-851b72234248
v
Use gpt-4o and it will solve this issue.
d
Thanks for your input @Sahil Ive tried gpt 4o but same behavior. In fact the culprit was the maxToken.