[Frontend] create unified Cohere parser (#56392)

Signed-off-by: walterbm <walter.beller.morales@gmail.com>
Co-authored-by: Flora Feng <4florafeng@gmail.com>
This commit is contained in:
Walter Beller-Morales
2026-09-12 04:04:46 -04:00
committed by GitHub
co-authored by Flora Feng
parent d406f09eb8
commit 756794a9a7
21 changed files with 1919 additions and 2139 deletions
+15
View File
@@ -126,6 +126,21 @@ class ParserManager:
return _KimiK3Parser
if {reasoning_parser_name, tool_parser_name} & {
"cohere_command3",
"cohere_command4",
}:
from vllm.parser.cohere_command import CohereCommandParser
r_cls = reasoning_parser_cls
t_cls = tool_parser_cls
class _CohereCommandParser(CohereCommandParser):
reasoning_parser_cls = r_cls
tool_parser_cls = t_cls
return _CohereCommandParser
from vllm.parser.abstract_parser import DelegatingParser
r_cls = reasoning_parser_cls