I am facing field required (type=value_error.missing)

Error : 400 1 validation error for Request
body → tool_outputs → 0 → output
field required (type=value_error.missing)
I am getting this issue when i try to submit my output tools results in express js server.

const submitToolOutputs = async (result, run) => {
  openai.beta.threads.runs.submitToolOutputs(config.threadId, run.id, {
    tool_outputs: [
        tool_call_id: run.required_action.submit_tool_outputs.tool_calls[0].id,
        output: result,

Where result is the object.

I’m getting the same error. Have you had any luck figuring it out, @subashchandhrabose.c ?

Just to report back here, I have resolved this for myself.

The problem was that my app was imitating the format the body being sent to the submit_tool_outputs API by the OpenAI Assistant Playground:


But according to the documentation of that API, the body should look like this:


Once I changed my post body to the format as documented, it worked for me. This was highly counterintuitive. Usually it’s the documentation that’s behind reality, not the working example…

1 Like

Thanks for coming back to let us know … and document it for other people.

Welcome to the forum. You’re exactly the type of person we want here! Hope you stick around.