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

@@ -61,14 +61,6 @@ class ChatMessage(OpenAIBaseModel):
# vLLM-specific fields that are not in OpenAI spec
reasoning: str | None = None
reasoning_content: str | None = None
"""Deprecated: use `reasoning` instead."""
@model_validator(mode="after")
def handle_deprecated_reasoning_content(self):
"""Copy reasoning to reasoning_content for backward compatibility."""
self.reasoning_content = self.reasoning
return self
class ChatCompletionLogProb(OpenAIBaseModel):

View File

@@ -1186,8 +1186,8 @@ class OpenAIServingChat(OpenAIServing):
delta_content_parts = []
if delta_message.content:
delta_content_parts.append(delta_message.content)
if delta_message.reasoning_content:
reasoning = delta_message.reasoning_content
if delta_message.reasoning:
reasoning = delta_message.reasoning
delta_content_parts.append(f"[reasoning: {reasoning}]")
if delta_message.tool_calls:
tool_args = "".join(