[PARSER][Mistral] unified engine-based parser for reasoning and tool calls (#48947)

This commit is contained in:
Julien Denize
2026-07-30 15:38:00 +02:00
committed by GitHub
parent e2efe79695
commit 1a20d23dab
30 changed files with 2934 additions and 1495 deletions
+6
View File
@@ -34,6 +34,7 @@ from tests.parser.engine.trace_builder import _BUILDERS, build_samples
from vllm.parser.engine import registered_adapters as _adapters_mod
from vllm.parser.engine.parser_engine import ParserEngine
from vllm.parser.engine.parser_engine_config import ParserState
from vllm.parser.mistral import MistralParser
# ── Parser discovery ─────────────────────────────────────────────────
@@ -64,6 +65,11 @@ def _discover_parsers() -> list[_ParserInfo]:
and obj is not ParserEngine
):
continue
if obj is MistralParser:
# Mistral uses brace-balanced JSON tool args with no TOOL_END
# token, so it does not fit this TOOL_END-based replay harness.
# It is covered by tests/parser/mistral/ instead.
continue
cfg = obj(bare_tok, None).parser_engine_config
if cfg.name not in _BUILDERS:
missing_builders.append(f"{obj.__name__} (config.name={cfg.name!r})")