Remove deprecated reasoning_content message field(part-2) (#37480)

Signed-off-by: JartX <sagformas@epdcenter.es>
Signed-off-by: Ifta Khairul Alam Adil <ikaadil007@gmail.com>
Signed-off-by: Netanel Haber <58652339+netanel-haber@users.noreply.github.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: Philip Ottesen <phiott256@gmail.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Signed-off-by: Michael Goin <mgoin64@gmail.com>
Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>
Signed-off-by: Andy Lo <andy@mistral.ai>
Signed-off-by: Thillai Chithambaram <thillaichithambaram.a@gmail.com>
Signed-off-by: sihao.li <sihao.li@intel.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: JartX <sagformas@epdcenter.es>
Co-authored-by: Netanel Haber <58652339+netanel-haber@users.noreply.github.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
Co-authored-by: Philip Ottesen <phiott256@gmail.com>
Co-authored-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Co-authored-by: Michael Goin <mgoin64@gmail.com>
Co-authored-by: Giancarlo Delfin <32987265+TheEpicDolphin@users.noreply.github.com>
Co-authored-by: Andy Lo <andy@mistral.ai>
Co-authored-by: Thillai Chithambaram <79466435+thillai-c@users.noreply.github.com>
Co-authored-by: sihao_li <165983188+1643661061leo@users.noreply.github.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Ifta khairul Alam Adil
2026-03-19 15:20:08 +00:00
committed by GitHub
co-authored by JartX Netanel Haber Wentao Ye Philip Ottesen Woosuk Kwon Michael Goin Giancarlo Delfin Andy Lo Thillai Chithambaram sihao_li Harry Mellor
parent 96266f119b
commit 104605cbf2
8 changed files with 36 additions and 38 deletions
@@ -61,10 +61,10 @@ class ResponsesParser:
# Store the finish_reason from the output
self.finish_reason = output.finish_reason
reasoning_content, content = self.reasoning_parser_instance.extract_reasoning(
reasoning, content = self.reasoning_parser_instance.extract_reasoning(
output.text, request=self.request
)
if reasoning_content:
if reasoning:
self.response_messages.append(
ResponseReasoningItem(
type="reasoning",
@@ -73,7 +73,7 @@ class ResponsesParser:
content=[
Content(
type="reasoning_text",
text=reasoning_content,
text=reasoning,
)
],
)
+4 -4
View File
@@ -191,13 +191,13 @@ def _construct_single_message_from_response_item(
],
)
elif isinstance(item, ResponseReasoningItem):
reasoning_content = ""
reasoning = ""
if item.encrypted_content:
raise ValueError("Encrypted content is not supported.")
elif item.content and len(item.content) >= 1:
reasoning_content = item.content[0].text
reasoning = item.content[0].text
elif len(item.summary) >= 1:
reasoning_content = item.summary[0].text
reasoning = item.summary[0].text
logger.warning(
"Using summary text as reasoning content for item %s. "
"Please use content instead of summary for "
@@ -206,7 +206,7 @@ def _construct_single_message_from_response_item(
)
return {
"role": "assistant",
"reasoning": reasoning_content,
"reasoning": reasoning,
}
elif isinstance(item, ResponseOutputMessage):
return {
+1 -1
View File
@@ -199,7 +199,7 @@ class Parser:
request: The request object used to generate the output.
Returns:
A tuple of (reasoning_content, response_content).
A tuple of (reasoning, response_content).
"""
@abstractmethod
@@ -17,9 +17,7 @@ class NemotronV3ReasoningParser(DeepSeekR1ReasoningParser):
def extract_reasoning(
self, model_output: str, request: ChatCompletionRequest | ResponsesRequest
) -> tuple[str | None, str | None]:
reasoning_content, final_content = super().extract_reasoning(
model_output, request
)
reasoning, final_content = super().extract_reasoning(model_output, request)
chat_template_kwargs = getattr(request, "chat_template_kwargs", None)
if (
@@ -30,6 +28,6 @@ class NemotronV3ReasoningParser(DeepSeekR1ReasoningParser):
)
and final_content is None
):
reasoning_content, final_content = final_content, reasoning_content
reasoning, final_content = final_content, reasoning
return reasoning_content, final_content
return reasoning, final_content
+1 -1
View File
@@ -295,7 +295,7 @@ class StreamingXMLToolCallParser:
final_delta = DeltaMessage(
role=None,
content=None,
reasoning_content=None,
reasoning=None,
tool_calls=[
DeltaToolCall(
index=self.tool_call_index - 1,