vllm.parser.engine.adapters ¶
Adapters that expose :class:ParserEngine through the legacy :class:ReasoningParser and :class:ToolParser interfaces.
This lets parser engines flow through the existing serving-layer code paths that expect separate reasoning and tool parser instances, without any changes to the serving layer itself.
Classes:
-
ParserEngineReasoningAdapter–Adapts a :class:
ParserEngineto the :class:ReasoningParser -
ParserEngineToolAdapter–Adapts a :class:
ParserEngineto the :class:ToolParserinterface.
ParserEngineReasoningAdapter ¶
Bases: ReasoningParser
Adapts a :class:ParserEngine to the :class:ReasoningParser interface so parser engines can be used as reasoning parsers in the existing serving code.
Subclasses set :attr:_parser_engine_cls to the concrete :class:ParserEngine class.
Source code in vllm/parser/engine/adapters.py
ParserEngineToolAdapter ¶
Bases: ToolParser
Adapts a :class:ParserEngine to the :class:ToolParser interface.
:meth:extract_tool_calls starts the parser engine in CONTENT state so it can parse reasoning-stripped content (i.e. the output of :meth:ReasoningParser.extract_reasoning).
Subclasses set :attr:_parser_engine_cls to the concrete :class:ParserEngine class.