# agent: Do not add \`\<using_tool\>\` placeholder \(\#29194\) · gitcafe/zed

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

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

Visibility: public

Requested revision: b14356d1d3980aa4dc5c0d01e163b9581bbad967

Requested commit: b14356d1d3980aa4dc5c0d01e163b9581bbad967

Commit: b14356d1d3980aa4dc5c0d01e163b9581bbad967

Tree: e6f92094f04d3223ea57c83d1ed23d6c62d3f503

Author: Agus Zubiaga

Committer: GitHub

## Message

```
agent: Do not add `<using_tool>` placeholder (#29194)

Our provider code in `language_models` filters out messages for which
`LanguageModelRequestMessage::contents_empty` returns `false`. This
doesn't seem wrong by itself, but `contents_empty` was returning `false`
for messages whose first segment didn't contain non-whitespace text even
if they contained other non-empty segments. This caused requests to fail
when a message with a tool call didn't contain any preceding text.

Release Notes:

- N/A
```

## Parents

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

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