-
Notifications
You must be signed in to change notification settings - Fork 60
Description
Issue:
When the tools error out the part of the UI message shows the state as "output-available" instead of "output-error".
Reason at least what I was able to find:
The issue is because in the createAssistantUIMessage function, in tool-result case we are checking for tool-call case's output which is not present in the allParts variable. So it goes in the condition and checks for 'error' field in the messages table which is also empty.
I hope the reason help in providing the right solution. I tried adding data to the error field which I think is not the right solution as if there are two tool calls and and one succeeds and other fails then both will be tagged as fail. I think the underlying issue is that tool-call log is not being created. I also noticed that if there are multiple tool calls the a record is created but still the output is not correct.


The first one did error out but is not showing the same. But as we can see in thedashboard a record was created.


When both the tool calls error out the tool-call record is not created. Also when there is an error the args data is also lost for the same reason as the tool-call record is not created.