[Bugfix] Interleaved thinking keeps compatibility with reasoning_content (#33635)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Co-authored-by: Koushik Dutta <koushd@gmail.com>
This commit is contained in:
Chauncey
2026-02-03 14:46:05 +08:00
committed by GitHub
parent a0a984ac2e
commit bf001da4bf

View File

@@ -1463,6 +1463,9 @@ def _parse_chat_message_content(
# Include reasoning if present for interleaved thinking.
if reasoning is not None:
result_msg["reasoning"] = cast(str, reasoning)
result_msg["reasoning_content"] = cast(
str, reasoning
) # keep compatibility
elif role == "tool":
parsed_msg = _ToolParser(message)
if "tool_call_id" in parsed_msg: