Skip to content

[Frontend] Consolidate startup utils. - #62390

Merged
noooop merged 18 commits into
vllm-project:mainfrom
noooop:setup_utils
Oct 19, 2026
Merged

noooop merged 18 commits into
vllm-project:mainfrom
noooop:setup_utils

Conversation

@noooop

@noooop noooop commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Consolidate setup utils.

Claims

Validation

Details


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added ci/build cohere Related to Cohere models frontend performance Performance-related issues intel-gpu Related to Intel GPU labels Oct 19, 2026
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@noooop

noooop commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings marked 🟡 are optional suggestions and need no follow-up push.

Additional findings (outside the current diff — GitHub can't attach inline comments there):

  • 🔴 vllm/entrypoints/common/setup.py — Every vllm serve start and every Rust-frontend launch will crash with AttributeError while logging non-default args. get_non_default_args imports FlexibleArgumentParser from vllm.platforms.interface. That module defines the real class only under TYPE_CHECKING, and at runtime it binds FlexibleArgumentParser = object. So make_arg_parser(FlexibleArgumentParser()) is passed a bare object() and fails on parser.add_argument. Fix: import it from vllm.utils.argparse_utils as the base did. This restores both callers that pass a Namespace: log_non_default_args and jsonify_non_default_args.

    Why this was flagged

    vllm/platforms/interface.py:27 imports FlexibleArgumentParser only inside if TYPE_CHECKING:, and line 33 sets FlexibleArgumentParser = object at runtime. The new setup.py:297 imports that runtime name, and setup.py:303 calls make_arg_parser(FlexibleArgumentParser()) for any Namespace argument. make_arg_parser (common/cli_args.py:428) immediately calls parser.add_argument(...), which raises AttributeError on a plain object. The Namespace path is the one used by launcher.setup_server via log_non_default_args(args), on every vllm serve/API server start. It is also used by RustFrontendProcessManager in vllm/v1/utils.py:334 via jsonify_non_default_args(args). On the base branch api_utils imported FlexibleArgumentParser from vllm.utils.argparse_utils, so both paths worked. Only the EngineArgs path, used by LLM in llm.py, still works.

    Verification: In vllm/entrypoints/common/setup.py, get_non_default_args imports FlexibleArgumentParser from vllm.platforms.interface (line 65) and calls make_arg_parser(FlexibleArgumentParser()) (line 71) for a Namespace. vllm/platforms/interface.py binds FlexibleArgumentParser = object at runtime, so parser.add_argument( (common/cli_args.py:428) raises AttributeError. The base api_utils.py imported it from vllm.utils.argparse_utils (line 26), so this is a regression.

  • 🔴 vllm/entrypoints/common/cli_args.py — After this merge the docs build makes cli/serve.md from a MagicMock instead of the real vllm serve parser, so the serve CLI reference breaks or comes out empty. docs/mkdocs/gen_files/generate_argparse.py:186 still calls auto_mock("vllm.entrypoints.launchers", "cli_args"). That module no longer exists, so auto_mock treats the ModuleNotFoundError as a missing dependency and swaps in a PydanticMagicMock. The build raises no error. Fix: point line 186 at auto_mock("vllm.entrypoints.common", "cli_args").

    Why this was flagged

    The mkdocs build runs docs/mkdocs/gen_files/generate_argparse.py. At line 186 it calls auto_mock("vllm.entrypoints.launchers", "cli_args"). This PR renames vllm/entrypoints/launchers/cli_args.py to vllm/entrypoints/common/cli_args.py, so importlib.import_module("vllm.entrypoints.launchers.cli_args") raises ModuleNotFoundError with e.name set to that missing module. auto_mock (lines 135-138) handles that by putting a PydanticMagicMock into sys.modules and returning it. At line 334, create_parser(openai_cli_args.make_arg_parser) then calls a mock. The mock returns a truthy MagicMock, and _parser or parser returns that mock instead of a real FlexibleArgumentParser. The generated cli/serve.md reference therefore has no real vllm serve flags, or formatting the mock fails. On the base branch the module exists and the page lists every serve argument. The repo-wide grep for launchers.cli_args misses this because the path is split into two string arguments.

    Verification: Trigger: any mkdocs docs build after this merge. docs/mkdocs/gen_files/generate_argparse.py:186 still has openai_cli_args = auto_mock("vllm.entrypoints.launchers", "cli_args"). Line 138 then stores a PydanticMagicMock in sys.modules under that name. No error comes out of auto_mock at this point. The real vllm serve parser is never built.

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@mergify

mergify Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--62390.org.readthedocs.build/en/62390/

@mergify mergify Bot added the documentation Improvements or additions to documentation label Oct 19, 2026
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@noooop

noooop commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Additional findings (outside the current diff — GitHub can't attach inline comments there):

  • 🟡 tools/pre_commit/mypy.py — nit: The moved offline and setup tests lose the stricter mypy check they had before. The new tests/entrypoints/common dir is not in SILENT_GROUPS, so it falls back to the lenient tests group. Both files used to sit under tests/entrypoints/unit_tests and tests/entrypoints/serve, which are listed. Fix: add "tests/entrypoints/common" to SILENT_GROUPS in tools/pre_commit/mypy.py next to tests/entrypoints/unit_tests.

    Why this was flagged

    The PR renames tests/entrypoints/unit_tests/test_offline_utils.py to tests/entrypoints/common/test_offline.py. It also moves TestRedactSensitiveArgs out of tests/entrypoints/serve/utils/test_api_utils.py into tests/entrypoints/common/test_setup.py. tools/pre_commit/mypy.py:30-77 lists tests/entrypoints/unit_tests (line 44) and tests/entrypoints/serve (line 42) in SILENT_GROUPS. Those paths run in the default group, which uses the stricter follow_imports setting from pyproject.toml. tests/entrypoints/common is not listed, so in group_files (lines 128-138) it matches the tests entry in SEPARATE_GROUPS (line 82). That group runs at the lenient setting. On the base branch these tests were type-checked strictly; after the move, type errors in them stop being reported by the pre-commit mypy hook.

    Verification: In tools/pre_commit/mypy.py, SILENT_GROUPS lists "tests/entrypoints/serve" (line 42) and "tests/entrypoints/unit_tests" (line 44). It has no "tests/entrypoints/common". Every other file under tests/ matches the "tests" entry in SEPARATE_GROUPS (line 82), run with follow_imports = "skip" (line 183). So the moved tests are now type-checked with imports skipped, a weaker check than they had before.

@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 19, 2026
@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #95845 for commit 781b29aaba1d.

@noooop noooop removed the intel-gpu Related to Intel GPU label Oct 19, 2026
@mergify mergify Bot added the intel-gpu Related to Intel GPU label Oct 19, 2026
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@noooop noooop removed the intel-gpu Related to Intel GPU label Oct 19, 2026
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@noooop

noooop commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #95863 for commit 2bf65779ec3e.

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
@noooop
noooop requested a review from BugenZhao as a code owner October 19, 2026 08:34
@noooop

noooop commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #95864 for commit 4cad4d4b095a.

@mergify mergify Bot added the rust label Oct 19, 2026
@noooop
noooop merged commit 5caabdb into vllm-project:main Oct 19, 2026
344 checks passed
@noooop
noooop deleted the setup_utils branch October 19, 2026 16:05
pawel-olejniczak added a commit to pawel-olejniczak/vllm-gaudi that referenced this pull request Oct 22, 2026
… cli_args and cli_env_setup from vllm.entrypoints.common

Root cause: vllm#62390 moved launchers/cli_args.py to common/cli_args.py and cli_env_setup to common/startup.py
Upstream: vllm-project/vllm#62390
Fix: point the multi-model server imports at common.cli_args and common.startup, where they live at the pin

Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@intel.com>
iboiko-habana pushed a commit to vllm-project/vllm-gaudi that referenced this pull request Oct 22, 2026
… cli_args and cli_env_setup from vllm.entrypoints.common (#1910)

This PR consolidates 1 hourly-CI fix against
vllm@`876d5da8316a81180b8c7f10dea5ffab5b5a849f`.

## Bug 1: Import cli_args and cli_env_setup from vllm.entrypoints.common

- **State machine id**:
missing_module_vllm_entrypoints_launchers_cli_args
- **Commit**: fa53aeb

### Root cause
vllm#62390 moved launchers/cli_args.py to common/cli_args.py and
cli_env_setup to common/startup.py

### Culprit
Probable culprit: [PR
#62390](vllm-project/vllm#62390) - pinned by
symbol archaeology, bisect not run.
Candidate range:
[compare](vllm-project/vllm@852989f...876d5da).

### Fix
point the multi-model server imports at common.cli_args and
common.startup, where they live at the pin
bantianyue pushed a commit to bantianyue/vllm that referenced this pull request Oct 28, 2026
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
ricky-chaoju pushed a commit to vllm-project/vllm-metal that referenced this pull request Nov 9, 2026
#1249 moved vLLM to 0.33.0 but left the `omni` extra on vLLM-Omni
`c4ac0642bd`. vLLM 0.33.0 moved `vllm.entrypoints.launchers.cli_args` to
`vllm.entrypoints.common.cli_args` (vllm-project/vllm#62390), and that
Omni commit still imports the old path, so on current main any Omni
entry point fails at import:

```
$ vllm serve --omni --help
  File ".../vllm_omni/entrypoints/cli/serve.py", line 24, in <module>
    from vllm.entrypoints.launchers.cli_args import make_arg_parser, validate_parsed_serve_args
ModuleNotFoundError: No module named 'vllm.entrypoints.launchers.cli_args'
```

vLLM-Omni v0.33.0rc1 (`4b63581cf6`, vllm-project/vllm-omni#9648) is the
Omni commit aligned with vLLM 0.33.0. This PR pins the extra to it.

Tested on M1 Pro / 16 GB, macOS 26.6.2, with `./install.sh` and `uv pip
install -e '.[dev,omni]'` from this branch (vLLM 0.33.0+cpu, Torch
2.16.0.dev20261013, vLLM-Omni 0.33.0rc1):
- The import error above reproduces with the old pin and is gone with
the new one.
- `VLLM_METAL_BACKEND=mps` resolves the Omni platform to
`MPSOmniPlatform`.
- Qwen3-TTS-12Hz-0.6B-CustomVoice served with the command in
`docs/qwen3-tts-mps.md`; the doc's curl request returns a valid 24 kHz
mono WAV.
- `pytest -m "not slow" tests/`: 6400 passed, 46 skipped, 352
deselected.

#1235 also edits this line (to a fork commit); whichever lands second
will need a rebase.

CI does not install the `omni` extra, which is why this went unnoticed.
I left that out of this PR to keep it to the pin.

Signed-off-by: Diao Shengjia <104132148+GoDiao@users.noreply.github.com>
wthrbtn added a commit to air-gapped/skills that referenced this pull request Nov 10, 2026
…is a package, ChatTemplateResolutionError in vllm/exceptions.py

Classification: version-drift (moved paths and symbols)
Source: vllm-project/vllm#60972 (commit 669f85e686, first in v0.33.0)
Source: vllm-project/vllm#62390 (commit 5caabdbb65, first in v0.33.0)
Before: SKILL.md cited vllm/renderers/chat_utils.py and _get_full_multimodal_text_prompt();
        debugging.md labelled five validation errors ValueError.
After:  vllm/renderers/chat_utils/{chat_template,chat_message,content_parser}.py,
        get_full_multimodal_text_prompt(), vllm/exceptions.py; the five errors raise
        VLLMValidationError (read at the v0.33.0 tag; the path-like one already did at
        v0.32.0). sources.md carries the v0.33.0 line anchors.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
wthrbtn added a commit to air-gapped/skills that referenced this pull request Nov 10, 2026
…ypoints/common/cli_args.py at v0.33.0

Classification: deprecation (path removed, no shim)
Source: vllm-project/vllm#62390 (merged 2026-10-19), v0.33.0 tree
Before: SKILL.md 'Where things live' and custom-parser-plugin.md step 5 point at vllm/entrypoints/launchers/cli_args.py and at import_tool_parser in entry.py/launcher.py
After:  vllm/entrypoints/common/cli_args.py for the flags and init_parser_plugin, with the v0.29.0-v0.32.0 location kept for older trees

Every other path the skill cites was checked against git ls-tree -r v0.33.0 and exists.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build cohere Related to Cohere models documentation Improvements or additions to documentation frontend performance Performance-related issues ready ONLY add when PR is ready to merge/full CI is needed rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants