# Fix error when Copilot calls tools without arguments \(\#30371\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 25ced2e3c2e1c5aa81c8b51fec721613563687a6

Requested commit: 25ced2e3c2e1c5aa81c8b51fec721613563687a6

Commit: 25ced2e3c2e1c5aa81c8b51fec721613563687a6

Tree: 56e8d4cba769ffcf995a7522b143ef2682b009ed

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Fix error when Copilot calls tools without arguments (#30371)

Fixes https://github.com/zed-industries/zed/issues/30346

The model can output an empty string to indicate the absence of
arguments, which can't be parsed as a `serde_json::Value`. When that
happens, we now create an empty object instead on behalf of the model.

Release Notes:

- Fixed a bug that prevented Copilot models from calling the
`diagnostic` tool.
```

## Parents

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

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