# bedrock: Fix subsequent bedrock tool calls fail \(\#33174\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 098896146e00bdf7fc25b1d7c74ab87b0778619d

Requested commit: 098896146e00bdf7fc25b1d7c74ab87b0778619d

Commit: 098896146e00bdf7fc25b1d7c74ab87b0778619d

Tree: c378a264c40c51c41f8af0a6c53627663d2a073a

Author: Vladimir Kuznichenkov

Committer: GitHub

## Message

```
bedrock: Fix subsequent bedrock tool calls fail (#33174)

Closes #30714

Bedrock converse api expect to see tool options if at least one tool was
used in conversation in the past messages.

Right now if `LanguageModelToolChoice::None` isn't supported edit agent
[remove][1] tools from request. That point breaks Converse API of
Bedrock. As was proposed in [the issue][2] we won't drop tool choose but
instead will deny any of them if model will respond with a tool choose.

[1]:
https://github.com/x-qdo/zed/blob/fceba6c79540677c2504d2c22191963b6170591a/crates/assistant_tools/src/edit_agent.rs#L703
[2]:
https://github.com/zed-industries/zed/issues/30714#issuecomment-2886422716

Release Notes:

- Fixed bedrock tool calls in edit mode
```

## Parents

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

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