# Change \`tool_calls\` to be an Option in response \(\#13778\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/995b082c6487b1230d848623f443539fb1c7e1cb)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 995b082c6487b1230d848623f443539fb1c7e1cb

Requested commit: 995b082c6487b1230d848623f443539fb1c7e1cb

Commit: 995b082c6487b1230d848623f443539fb1c7e1cb

Tree: d7297310d8894d8170b7718adc0f220ad6cf138a

Author: Allison Durham

Committer: GitHub

## Message

```
Change `tool_calls` to be an Option in response (#13778)

Here is an image of my now getting assistance responses!

![2024-07-03_08-45-37_swappy](https://github.com/zed-industries/zed/assets/20910163/904adc51-cb40-4622-878e-f679e0212426)

I ended up adding a function to handle the use case of not serializing
the tool_calls response if it is either null or empty to keep the
functionality of the existing implementation (not deserializing if vec
is empty). I'm sorta a noob, so happy to make changes if this isn't done
correctly, although it does work and it does pass tests!

Thanks a bunch to [amtoaer](https://github.com/amtoaer) for pointing me
in the direction on how to fix it.

Release Notes:

- Fixed some responses being dropped from OpenAI-compatible providers
([#13741](https://github.com/zed-industries/zed/issues/13741)).
```

## Parents

- [64755a7aeaeb18defb12f0c78a42148038cab560](https://git.cafe/gitcafe/zed/commit/64755a7aeaeb18defb12f0c78a42148038cab560?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/995b082c6487b1230d848623f443539fb1c7e1cb?format=markdown)
