# Expected Tool output for wrong call id

**URL:** <https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554>\
**Category:** API\
**Tags:** api, assistants, assistants-api\
**Created:** [December 15, 2023, 9:57pm UTC](https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554 "2023-12-15T21:57:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal3](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@pascal3](https://community.openai.com/u/pascal3)\
**Post date:** [December 15, 2023, 9:57pm UTC](https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554/1 "2023-12-15T21:57:16Z")

</div>

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

```auto
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?

---

<div class="post-metadata">

**Author:** ![juanjavier](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/juanjavier/32/146585_2.png) [@juanjavier](https://community.openai.com/u/juanjavier)\
**Post date:** [December 19, 2023, 3:26pm UTC](https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554/2 "2023-12-19T15:26:14Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![juanjavier](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/juanjavier/32/146585_2.png) [@juanjavier](https://community.openai.com/u/juanjavier)\
**Post date:** [December 19, 2023, 9:09pm UTC](https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554/3 "2023-12-19T21:09:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pascal3](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@pascal3](https://community.openai.com/u/pascal3)\
**Post date:** [December 20, 2023, 3:09pm UTC](https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554/4 "2023-12-20T15:09:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![EricGT](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ericgt/32/20571_2.png) [@EricGT](https://community.openai.com/u/EricGT)\
**Post date:** [December 20, 2023, 3:10pm UTC](https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554/5 "2023-12-20T15:10:01Z")

</div>

As this topic has a selected [solution](https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554/3) can it be closed?

---

<div class="post-metadata">

**Author:** ![pascal3](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@pascal3](https://community.openai.com/u/pascal3)\
**Post date:** [December 20, 2023, 3:11pm UTC](https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554/6 "2023-12-20T15:11:00Z")

</div>

> [@juanjavier](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![EricGT](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ericgt/32/20571_2.png) [@EricGT](https://community.openai.com/u/EricGT)\
**Post date:** [December 20, 2023, 3:28pm UTC](https://community.openai.com/t/expected-tool-output-for-wrong-call-id/560554/7 "2023-12-20T15:28:24Z")

</div>


