Expected Tool output for wrong call id

So I am using the Assistants API and I get this message on one certain tool:

openai.BadRequestError: Error code: 400 - {'error': {'message': "Expected tool outputs for call_ids ['call_erVpITn1Z3lpoxbaL0Z7T5KE', 'call_xdmBXcXJos3uuBZEXR1Io6yZ'], got ['call_erVpITn1Z3lpoxbaL0Z7T5KE']", 'type': 'invalid_request_error', 'param': None, 'code': None}}

I don’t know what to do? Has anyone ever encountered this issue?


I’m encountering the same error every now and then:

ERROR	w_ [Error]: 400 Expected tool outputs for call_ids ['call_oX2aszcXB0cgt1xRRw73gqLy', 'call_Gi3NFnTfv8CBVLEHCCOuOM5Z', 'call_m4luEzjgknj5Z9AeXFInnfAV', 'call_iULTRsBUPzy4bHcwqE1zX5TR', 'call_fZkyenW0LxpNQmAFuL6Humrc'], got ['call_m4luEzjgknj5Z9AeXFInnfAV', 'call_oX2aszcXB0cgt1xRRw73gqLy', 'call_Gi3NFnTfv8CBVLEHCCOuOM5Z']

I only created one tool which calls a web search API, but the other ones I have no clue. Unfortunately I cannot replicate it yet, but I’m working on it.

Hey! I know what’s going on. Basically, the error tells you that your Assistant requested action for two tools (or twice on the same tool, who knows) and when you submitted the outputs, you only submitted the output for one tool.

When you submit the tool outputs, you must submit all outputs at the same time. So it could be that you submitted the outputs before all tool outputs were finished or maybe one of your tools had an error and produced no output.

Hey thanks so much! Yeah that sounds right. I just saw that I had forgot to delete an old part of a function, and after I deleted it, it seems to be working fine

As this topic has a selected solution can it be closed?

Yeah (I have to have 25 Characters to post it so I am writing this)