Skip to content

The tools not reporting proper errors with tools #162

@AayushGaRrg

Description

@AayushGaRrg

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.

Image Image

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

Image Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions