Remove deprecated reasoning_content message field (#33402)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-01-30 11:48:15 +00:00
committed by GitHub
parent 174f16700b
commit c5113f60f2
8 changed files with 26 additions and 55 deletions

View File

@@ -131,7 +131,7 @@ def extract_reasoning_and_calls(chunks: list) -> tuple[str, list[str], list[str]
Extract accumulated reasoning text and tool call arguments
from streaming chunks.
"""
reasoning_content: str = ""
reasoning: str = ""
tool_calls: dict[int, dict[str, str]] = {}
for chunk in chunks:
@@ -139,8 +139,8 @@ def extract_reasoning_and_calls(chunks: list) -> tuple[str, list[str], list[str]
if not choice:
continue
if hasattr(choice, "reasoning_content") and choice.reasoning_content:
reasoning_content += choice.reasoning_content
if hasattr(choice, "reasoning") and choice.reasoning:
reasoning += choice.reasoning
for tc in getattr(choice, "tool_calls", []) or []:
idx = getattr(tc, "index", 0)
@@ -156,7 +156,7 @@ def extract_reasoning_and_calls(chunks: list) -> tuple[str, list[str], list[str]
function_names: list[str] = [v["name"] for _, v in sorted(tool_calls.items())]
arguments: list[str] = [v["arguments"] for _, v in sorted(tool_calls.items())]
return reasoning_content, arguments, function_names
return reasoning, arguments, function_names
# ==========================================================