[Cohere] Remove dead prepare_structured_tag override in Cohere parser (#46099)
Signed-off-by: sfeng33 <4florafeng@gmail.com>
Flora Feng committed
Jun 18, 2026 at 21:02 UTC
560fb8b867aaa444d471b35fd846368ebacf12b9
1 file changed
-10
vllm/reasoning/cohere_command_reasoning_parser.py
-10
@@ -20,7 +20,6 @@ except ImportError as e:
20
) from e
21
22
23
-from vllm.entrypoints.mcp.tool_server import ToolServer
23
from vllm.entrypoints.openai.chat_completion.protocol import (
24
ChatCompletionRequest,
25
)
@@ -481,15 +480,6 @@ class BaseCohereCommandReasoningParser(ReasoningParser):
480
def is_reasoning_end(self, input_ids: Sequence[int]) -> bool:
481
return any(tid == self.end_token_id for tid in reversed(input_ids))
482
484
- def prepare_structured_tag(
485
- self, original_tag: str | None, tool_server: ToolServer | None
486
- ) -> str | None:
487
- # Responses API replaces ``structural_tag`` via the reasoning parser.
488
- # Default ``ReasoningParser.prepare_structured_tag`` returns None, which
489
- # would clear a Cohere tag produced in ``adjust_request`` and break
490
- # ``StructuredOutputsParams`` validation. Preserve the existing tag.
491
- return original_tag
492
-
483
def adjust_request(
484
self, request: ChatCompletionRequest | ResponsesRequest
485
) -> ChatCompletionRequest | ResponsesRequest: