[Mini-VLLM] Cut non-OpenAI surfaces, dead kernels, Mistral stack

- Remove Anthropic, Cohere, SageMaker, decisions, structured-decisions,
  rl, render-launcher and batch entrypoints; keep scale-out token routes
- Drop the Swagger static bundle and the /docs, /redoc routes
- Delete device-keyed tuning configs for fused_moe, quant utils, mamba
  select-state and helion; no sm86 entry ever existed for any of them
- Remove ten unused rope variants plus the fbgemm_fp8 and fp_quant
  quantizers and their config, metrics and loader plumbing
- Cut the CPU device build: csrc/cpu, cpu_extension.cmake, cpu
  requirements and the setup.py cpu target path
- Delete 29 environment variables nothing reads and 14 chat-template
  fallbacks for models this fork no longer registers
- Remove nine dead CUDA ops (deepseek_v4, kimi_k3, minimax, muse_spark,
  dsv3 gemm) with their kernels, bindings, wrappers and CMake entries
- Delete the connector test suites that targeted removed connectors
- Cut the Mistral tokenizer and parser stack, its tests, and the
  mistral_common and ijson dependency pins
- Restore the Qwen4Exp registry rows and nvidia/mtp.py that an earlier
  cut deleted while keeping the model tree

Co-authored-by: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-19 17:10:56 +07:00
co-authored by Hinata
parent bd70a61c20
commit 2066d3143f
1086 changed files with 122 additions and 291919 deletions
+2 -133
View File
@@ -2,11 +2,9 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import json
from types import SimpleNamespace
import pytest
import vllm.entrypoints.launchers.cli_args as cli_args_module
from tests.utils import VLLM_PATH
from vllm.engine.arg_utils import AsyncEngineArgs
from vllm.entrypoints.launchers.cli_args import (
@@ -180,73 +178,6 @@ def test_multiple_valid_inputs(serve_parser):
### Tests for serve argument validation that run prior to loading
@pytest.mark.parametrize(
"port, extra_args",
[
(50051, []),
(0, ["--port", "0"]),
(50051, ["--port", "50051", "--uds", "/tmp/vllm.sock"]),
],
)
def test_rust_grpc_port_accepts_frontend_launch(
vllm_parser, monkeypatch, port, extra_args
):
monkeypatch.setenv("VLLM_USE_RUST_FRONTEND", "1")
args = vllm_parser.parse_args(
[
"serve",
"--grpc-port",
str(port),
"--data-parallel-size",
"8",
"--data-parallel-size-local",
"4",
"--data-parallel-start-rank",
"4",
"--data-parallel-hybrid-lb",
*extra_args,
]
)
validate_parsed_serve_args(args)
assert args.grpc_port == port
@pytest.mark.parametrize(
"rust_enabled, extra_args, port",
[
(False, [], 50051),
(False, ["--grpc"], 50051),
(True, ["--grpc"], 50051),
(True, ["--headless"], 50051),
(True, ["--api-server-count", "0"], 50051),
(True, ["--api-server-count", "-1"], 50051),
(True, ["--data-parallel-multi-port-external-lb"], 50051),
(True, ["--port", "50051"], 50051),
(True, [], -1),
(True, [], 65536),
],
)
def test_rust_grpc_port_rejects_incompatible_launch(
vllm_parser, monkeypatch, rust_enabled, extra_args, port
):
monkeypatch.setenv("VLLM_USE_RUST_FRONTEND", "1" if rust_enabled else "0")
args = vllm_parser.parse_args(["serve", "--grpc-port", str(port), *extra_args])
error = (
"--grpc and --grpc-port are mutually exclusive"
if "--grpc" in extra_args
else "--grpc-port"
)
with pytest.raises(ValueError, match=error):
validate_parsed_serve_args(args)
def test_rust_grpc_port_requires_serve_subcommand(monkeypatch):
"""Direct Python render/API entrypoints must reject a Rust-only listener."""
monkeypatch.setenv("VLLM_USE_RUST_FRONTEND", "1")
parser = make_arg_parser(FlexibleArgumentParser())
args = parser.parse_args(["--grpc-port", "50051"])
with pytest.raises(ValueError, match="--grpc-port requires"):
validate_parsed_serve_args(args)
def test_enable_auto_choice_fails_without_tool_call_parser(serve_parser):
@@ -263,7 +194,7 @@ def test_enable_auto_choice_passes_with_tool_call_parser(serve_parser):
args=[
"--enable-auto-tool-choice",
"--tool-call-parser",
"mistral",
"qwen3_coder",
]
)
validate_parsed_serve_args(args)
@@ -280,7 +211,7 @@ def test_auto_tool_choice_with_reasoning_parser_passes(serve_parser):
args=[
"--enable-auto-tool-choice",
"--tool-call-parser",
"mistral",
"qwen3_coder",
"--reasoning-parser",
"deepseek_r1",
]
@@ -333,48 +264,6 @@ def test_per_request_metrics_requires_log_stats(serve_parser):
validate_parsed_serve_args(args)
def _build_launch_render_parser():
"""Mirror `vllm launch render`.
`vllm/entrypoints/cli/main.py` parses subcommands with ``dest="subparser"``,
and `LaunchSubcommandBase.add_cli_args` builds the component parser with
`make_arg_parser`, so a launch component carries serve args under
``args.subparser == "launch"``.
"""
vllm_parser = FlexibleArgumentParser()
subparsers = vllm_parser.add_subparsers(required=False, dest="subparser")
launch_parser = subparsers.add_parser("launch")
launch_subparsers = launch_parser.add_subparsers(
required=True, dest="launch_component"
)
render_parser = launch_subparsers.add_parser("render")
make_arg_parser(render_parser)
return vllm_parser
@pytest.fixture
def launch_render_parser():
return _build_launch_render_parser()
@pytest.mark.parametrize(
"cli_args, error",
[
(["--enable-auto-tool-choice"], TypeError),
(["--grpc-port", "50051"], ValueError),
],
)
def test_launch_render_validates_serve_args(
launch_render_parser, monkeypatch, cli_args, error
):
"""`vllm launch render` reuses the serve parser, so it gets the serve checks"""
monkeypatch.setenv("VLLM_USE_RUST_FRONTEND", "1")
args = launch_render_parser.parse_args(args=["launch", "render", *cli_args])
assert args.subparser == "launch"
with pytest.raises(error):
validate_parsed_serve_args(args)
def test_subcommand_without_serve_args_skips_validation():
"""A subcommand that does not use the serve parser is still skipped"""
vllm_parser = FlexibleArgumentParser()
@@ -456,26 +345,6 @@ def test_default_chat_template_kwargs_default_none(serve_parser):
assert args.default_chat_template_kwargs is None
@pytest.mark.parametrize(
"default_kwargs,cohere_format,expected",
[
(None, "cmd3", {"cohere_format": "cmd3"}),
(
{"cohere_format": "cmd4", "custom": True},
"cmd3",
{"cohere_format": "cmd4", "custom": True},
),
],
)
def test_resolve_default_chat_template_kwargs(default_kwargs, cohere_format, expected):
args = SimpleNamespace(
default_chat_template_kwargs=default_kwargs,
cohere_format=cohere_format,
)
assert cli_args_module.resolve_default_chat_template_kwargs(args) == expected
def test_default_chat_template_kwargs_invalid_json(serve_parser):
"""Ensure invalid JSON raises an error."""
with pytest.raises(SystemExit):