Unknown parameters "tool_outputs" while submitting tool output

Hi,
when submitting tool outputs to the assistant with the node api with this code

openai.beta.threads.runs.submitToolOutputs(threadId, runId, {
      tool_outputs: [
        {
          tool_call_id: toolCall.id,
          output: result,
        },
      ],
    });

I get an error 400 Unknown parameter: ‘tool_outputs’

However, the typescript and the typescript typings seems to say that i’m using the right format.
What am i doing wrong ?

Thank you

I reply to myself if others have he same problem.
The error message is misleading, it was not a problem with tool_outputs but with the runId, which was equal to empty string.

1 Like