From e42f95f821a6977ce649e1aab4fa58a53c2bf07c Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 23 Jul 2026 17:32:38 -0400 Subject: [PATCH] refac --- cptr/utils/ai.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cptr/utils/ai.py b/cptr/utils/ai.py index 5b822f1..b75733c 100644 --- a/cptr/utils/ai.py +++ b/cptr/utils/ai.py @@ -425,8 +425,8 @@ def _to_openai_messages( Strict default OpenAI-compatible requests do not receive provider-specific reasoning fields. llama.cpp compatibility replays text reasoning as - reasoning_content and preserves assistant text before tool calls. Other - non-standard fields (fc_id in tool_calls) are stripped. + reasoning_content. Other non-standard fields (fc_id in tool_calls) are + stripped. """ result = [] if instructions: @@ -436,8 +436,6 @@ def _to_openai_messages( continue content = m.get("content", "") - if provider_type != "llama.cpp" and m.get("role") == "assistant" and m.get("tool_calls"): - content = "" if isinstance(content, list): formatted_content = [] for block in content: