Skip to content

[Bug]: Action Calls Failing for Different Users in Assistant. 400 Expected tool outputs for call_ids ['call_xxxxx'], got [] #2284

Closed
@gloriousknight

Description

What happened?

I've encountered an issue while using the assistant where if a user creates an assistant and adds actions to it, other users are unable to correctly call these actions.

The page throws an error stating:
error: [/assistants/chat/] 400 Expected tool outputs for call_ids ['call_xxxxx'], got []

Upon investigation, I noticed that the issue arises because, in the ToolService.js file, at line 270, the loadActionSets function adds the user's ID as a filter condition:

if (!actionSets.length) {
  actionSets =
    (await loadActionSets({
      user: client.req.user.id,
      assistant_id: client.req.body.assistant_id,
    })) ?? [];
}

This filtering prevents other users from using the actions. What is the rationale behind adding this filter condition? It seems like it's aimed at adding permission controls for the assistant, but in the right panel, any user can see and edit the assistant. Could you please clarify the future development direction regarding this?

Steps to Reproduce

Step1. User A creates an assitant with action
Step2. User B uses this assitant with action, got error.

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge, Mobile (iOS), Mobile (Android)

Relevant log output

No response

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions