[Frontend] Fix the parsing of missing string= in DeepSeek V4 (#56271)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Bugen Zhao <i@bugenzhao.com> Signed-off-by: lazymio <mio@lazym.io>
This commit is contained in:
co-authored by
Claude Opus 5
Bugen Zhao
parent
dee37d8911
commit
39e33db7f3
@@ -5,11 +5,10 @@
|
||||
import functools
|
||||
from dataclasses import replace
|
||||
|
||||
import regex as re
|
||||
|
||||
from vllm.parser.deepseek_v4 import (
|
||||
DeepSeekV4Parser,
|
||||
_dsml_arg_converter,
|
||||
_param_patterns,
|
||||
deepseek_v4_config,
|
||||
)
|
||||
from vllm.parser.engine.parser_engine_config import ParserEngineConfig
|
||||
@@ -21,17 +20,7 @@ DSML_INVOKE_END = "</|DSML| invoke>"
|
||||
DSML_PARAM_START = "<|DSML| parameter"
|
||||
DSML_PARAM_CLOSE = "</|DSML| parameter>"
|
||||
|
||||
_PARAM_RE = re.compile(
|
||||
r'<|DSML| parameter\s+name="([^"]+)"\s+string="(true|false)">'
|
||||
r"(.*?)"
|
||||
r"(?:</|DSML| parameter>|(?=<|DSML| parameter\s+name=))",
|
||||
re.DOTALL,
|
||||
)
|
||||
_PARTIAL_PARAM_RE = re.compile(
|
||||
r'<|DSML| parameter\s+name="([^"]+)"\s+string="(true|false)">'
|
||||
r"(.*)$",
|
||||
re.DOTALL,
|
||||
)
|
||||
_PARAM_RE, _PARTIAL_PARAM_RE = _param_patterns(DSML_PARAM_START, DSML_PARAM_CLOSE)
|
||||
|
||||
|
||||
@functools.cache
|
||||
|
||||
Reference in New Issue
Block a user