Tools: Strict parameter validation not always work...
# support
j
I have configured a tool that calls my API with a required "recipe" parameter. Somehow it called the tool but without the required field, it called the tool just empty Org ID ecb47424-f8f2-4e36-b9c0-b128e5126c13 . Call ID c8be680a-061c-4e28-9ad4-8607901e00d2 . Assistant ID d92417fe-3a9d-4a90-8741-ab7c312be2f2
k
Hey Jorge, allow me some time to get back to you with a proper investigation.
j
It happened again @User @Shubham Bajaj : Call ID: 9174dfc3-86da-4948-b2c2-71689062a1b9 Tool call ID: call_ao2IY7OVwOkzsV7C5eCAWaZd
n
I'm the partner of @Jorge , more examples here. Call ID: f4a6513c-79e7-4a96-8c8f-5c79382adfce Tool call ID: call_UwPXMTgr5sGqwdKkzdDYR3AH
Another one empty: Tool Call ID:call_9Z0RdhzupW4G05gNjztlVd4H Call ID:43c0b354-4958-40b1-9dc2-485053aa87eb
k
Hey Jorge, I'm working on it. It's not what you mentioned; it's something else. Let me do detailed investigation.
j
great thanks for the follow up
I found another case in which I provided an enum for the structure and vapi generated an invalid field of the enum. Call ID: 79187293-d13d-4694-b679-3e68ded044bf It did a request to my server with this info: Model called tool: ActualizarReceta-Test({"id":"frSMwLG4sx0QUvP1BhhI","ingredients":[{"id":"arroz","name":"arroz","quantity_per_production":100,"unit":"g"}]}) But the unit is defined like this in the json schema: "unit": { "description": "Unit of the ingredient", "type": "string", "enum": [ "kg", "l", "ud" ] },
And again: ZodError: [ [2] { [2] "code": "invalid_type", [2] "expected": "string", [2] "received": "undefined", [2] "path": [ [2] "ingredients", [2] 0, [2] "name" [2] ], [2] "message": "Required" [2] } [2] ] call id: 4cd1f917-9608-4f6c-a0b3-1845e817346c
s
@Jorge Your tool doesn't have strict set to true that is why broke on your server set it to true and then try to 2-3 test calls. Let me know how it goes for you. https://cdn.discordapp.com/attachments/1352604789082689578/1355535000971509892/message.txt?ex=67e947d8&is=67e7f658&hm=47804b0c9aed5083a9f2d954a31b484ed47e225afe79ade519196552f3e86109&
j
Hello Shubham I am pretty sure the strict parameter was set to true for the provided examples, maybe I missed 1 and it was me not putting the strict. But please, could you review the rest of tool calls, strict is not working propperly and I decided to add a call to openai on my servers which add a lot of time for the updates.
s
Hey @Jorge , as you can see the other two tools which have strict set to true were not invoked in the last two shared call IDs. I will suggest you to make another one or two calls and invoke these tool, and then try. It will work. https://cdn.discordapp.com/attachments/1352604789082689578/1355877799944130560/Screenshot_2025-03-30_at_5.42.47_PM.png?ex=67ea871a&is=67e9359a&hm=4429d17c0105451da42a773e21a89ad5d152c47359fd84e9bcdbdaf53eced333&
@Jorge Let me know if you have more doubts or require further clarifications
24 Views