From 7411d3dbedfed9aa45a52042fc5227e4317f4710 Mon Sep 17 00:00:00 2001 From: hobokenchicken Date: Thu, 5 Mar 2026 18:24:06 +0000 Subject: [PATCH] fix(deepseek): preserve reasoning_content in history for R1 DeepSeek R1 (deepseek-reasoner) requires that assistant messages in the history containing tool_calls must also include their reasoning_content field. --- src/providers/helpers.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/providers/helpers.rs b/src/providers/helpers.rs index f4464a6d..8e68b34e 100644 --- a/src/providers/helpers.rs +++ b/src/providers/helpers.rs @@ -60,6 +60,11 @@ pub async fn messages_to_openai_json(messages: &[UnifiedMessage]) -> Result