Remove deprecated reasoning_content message field (#33402)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user