mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-20 23:50:25 +01:00
5dd8561b06
## Closes #43887 ## Release Notes: ### Problem DeepSeek's reasoning mode API requires `reasoning_content` to be included in assistant messages that precede tool calls. Without it, the API returns a 400 error: ``` Missing `reasoning_content` field in the assistant message at message index 2 ``` ### Added/Fixed/Improved - Add `reasoning_content` field to `RequestMessage::Assistant` in `crates/deepseek/src/deepseek.rs` - Accumulate thinking content from `MessageContent::Thinking` and attach it to the next assistant/tool-call message - Wire reasoning content through the language model provider in `crates/language_models/src/provider/deepseek.rs` ### Testing - Verified with DeepSeek Reasoner model using tool calls - Confirmed reasoning content is properly included in API requests Fixes tool-call errors when using DeepSeek's reasoning mode. --------- Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>