Skip to content

docs: Document selecting the Rust vLLM gRPC servicer: smg serve --servicer-impl and SMG_VLLM_SERVICER_IMPL - #105

Merged
slin1237 merged 1 commit into
mainfrom
codex/nightly-docs-02ace34f4ad7df89
Oct 3, 2026
Merged

slin1237 merged 1 commit into
mainfrom
codex/nightly-docs-02ace34f4ad7df89

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

What this PR does

How do I run vLLM gRPC workers on the Rust servicer implementation — which smg serve flag or worker environment variable selects it, what is the default, which backend/connection-mode combinations are valid, and what must be installed for the selection to take effect instead of silently running Python?

Why we need it

Source change: smg-project/smg@1a32255

Commit 5 (#2727, 1a322557, 2026-10-02) added a launch-time switch between two implementations of the vLLM gRPC servicer, verified on current main. bindings/python/src/smg/serve.py: add_serve_args declares --servicer-impl with default python and choices python/rust (lines ~773-782: 'rust keeps the same vLLM gRPC contract but serves it from Rust over a same-host ZMQ engine connection, selected through SMG_VLLM_SERVICER_IMPL in the worker's environment; requires --backend vllm --connection-mode grpc'); VllmWorkerLauncher.gpu_env (lines 268-281) sets SMG_VLLM_SERVICER_IMPL=rust in each worker's environment only for connection_mode grpc + servicer_impl rust, and otherwise pops an inherited value ('The flag is authoritative'); parse_serve_args (lines ~880-891) rejects --servicer-impl rust for any backend/connection-mode other than vllm/grpc and calls _require_rust_servicer_hook (lines ~835-844), which fails fast when smg-grpc-servicer is not importable or the installed vLLM lacks the hook. grpc_servicer/smg_grpc_servicer/vllm/rust.py: SERVICER_IMPL_ENV="SMG_VLLM_SERVICER_IMPL" (line 55); resolve_servicer_impl (lines 451-469) reads args.servicer_impl, else the env var, else python; upstream_hook_installed (lines 486-511) scans the installed vLLM's entrypoints tree for the resolve_servicer_impl hook; require_upstream_hook (lines 517-525) refuses a rust selection on a vLLM without the hook; require_python_impl (lines 472-481) makes the Python servicer itself refuse to start when the flag asks for rust, so misconfiguration fails loudly rather than silently serving Python. The env-var path works on upstream's own entrypoint unchanged: SMG_VLLM_SERVICER_IMPL=rust python -m vllm.entrypoints.grpc_server ... (grpc_servicer/README.md section 'Rust request path (SMG_VLLM_SERVICER_IMPL=rust)'), and Rust mode additionally needs the smg wheel, which carries the smg.servicer.VllmGrpcServer binding (bindings/python/src/smg/servicer.py). The Router cannot tell the two implementations apart (rust.py module doc, line 13), and the Python implementation stays the default. Tests pin the CLI contract: test_rust_servicer_is_a_worker_env_flag_not_a_command and test_python_servicer_clears_an_inherited_rust_flag (bindings/python/tests/test_serve.py). Docs gap: a repo-wide grep for servicer-impl, SMG_VLLM_SERVICER_IMPL, VllmGrpcServer, and engine_servicer finds nothing in src/lib/content; getting-started/index.md's smg serve options table (lines 166-176) lists --backend and --connection-mode but not --servicer-impl, and getting-started/grpc-workers.md's 'Start a gRPC Worker' vLLM tab (lines 44-51) shows only the default Python-servicer start. Version caveat: the commit landed after the v1.11.0 bump (commit 37, #2670, 2026-09-24), so the edit must present the flag as current-main behavior without promising a release. This is one independent concern: one commit's launch-time selection surface (flag, env var, default, valid combinations, fail-fast requirements), documented where vLLM gRPC workers are started. The Rust servicer's runtime serving contract and the --mm-processor smg media mode it enables (commit 3, #2741) are the grpc-multimodal scan's charter — and the only page enumerating --mm-processor values (concepts/architecture/multimodal.md:117) is locked by open PR #103 — so they are deliberately excluded. No open or closed PR mentions the Rust servicer.

Scope: cli-configuration / vllm-rust-servicer-selection. Other concerns are deferred.

How to test

  • Passed the documentation path and size guard (under 1000 added plus deleted lines; no file-count limit).
  • Passed an independent accuracy and single-concern review.
  • Passed git diff --check and pnpm check and the production pnpm build.

Checklist

  • Tests added/updated (if applicable)
  • Docs updated (if applicable)
  • Commit signed off by XinyueZhang369 zoeyzhang369@gmail.com

Signed-off-by: XinyueZhang369 <zoeyzhang369@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cc3d3daf-8860-4233-841b-ca52d59ccc9c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants