![]() ### Context The Anthropic API fails if a request message contains a tool use and no `Text` segments or it only contains empty `Text` segments. These are cases that the model itself produces, but the API doesn't support sending them back. #27917 fixed this by appending "Using tool..." in the thread's message, but this causes the actual conversation to include it, so it would appear in the UI (we would actually display a gap because we never rendered its markdown, but "Using tool..." would show up when the thread was restored). ### Solution We'll now only append this placeholder when we build the request, so the API still sees it, but the UI/Thread doesn't. Another issue we found is that the model starts mimicking these placeholders in later tool uses which is undesirable. So unfortunately, we had to add logic to filter them out. Release Notes: - agent: Improved rendering of tool uses without text --------- Co-authored-by: Bennet <bennet@zed.dev> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-GPL |