From 560fb8b867aaa444d471b35fd846368ebacf12b9 Mon Sep 17 00:00:00 2001 From: Flora Feng <4florafeng@gmail.com> Date: Thu, 18 Jun 2026 21:02:11 -0400 Subject: [PATCH] [Cohere] Remove dead prepare_structured_tag override in Cohere parser (#46099) Signed-off-by: sfeng33 <4florafeng@gmail.com> --- vllm/reasoning/cohere_command_reasoning_parser.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/vllm/reasoning/cohere_command_reasoning_parser.py b/vllm/reasoning/cohere_command_reasoning_parser.py index 949c9ff5d9..34066ef2d9 100644 --- a/vllm/reasoning/cohere_command_reasoning_parser.py +++ b/vllm/reasoning/cohere_command_reasoning_parser.py @@ -20,7 +20,6 @@ except ImportError as e: ) from e -from vllm.entrypoints.mcp.tool_server import ToolServer from vllm.entrypoints.openai.chat_completion.protocol import ( ChatCompletionRequest, ) @@ -481,15 +480,6 @@ class BaseCohereCommandReasoningParser(ReasoningParser): def is_reasoning_end(self, input_ids: Sequence[int]) -> bool: return any(tid == self.end_token_id for tid in reversed(input_ids)) - def prepare_structured_tag( - self, original_tag: str | None, tool_server: ToolServer | None - ) -> str | None: - # Responses API replaces ``structural_tag`` via the reasoning parser. - # Default ``ReasoningParser.prepare_structured_tag`` returns None, which - # would clear a Cohere tag produced in ``adjust_request`` and break - # ``StructuredOutputsParams`` validation. Preserve the existing tag. - return original_tag - def adjust_request( self, request: ChatCompletionRequest | ResponsesRequest ) -> ChatCompletionRequest | ResponsesRequest: