Repository navigation
Conversation
This was referenced Oct 29, 2026
BugenZhao
force-pushed
the
bz/engine-client-trait
branch
from
October 29, 2026 13:41
659069a to
7736993
Compare
EngineClient traitLlm trait
BugenZhao
force-pushed
the
bz/engine-client-trait
branch
5 times, most recently
from
November 3, 2026 06:31
43da6d5 to
8de8a5d
Compare
`Llm` is the token-level generate/abort facade over the engine-core client. Name it after what it drives, so that `Llm` can name the layer's interface in the next commit. Pure rename. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CJckCBxv8Gtnq23avKQwau Signed-off-by: Bugen Zhao <i@bugenzhao.com>
`TextLlm` owned a concrete `EngineCoreLlm`, so the text, chat, and server layers could only run over an engine-core client. Make `Llm` the layer's interface, the generate/abort subset of Python's `EngineClient`, with `EngineCoreLlm` as its engine-core implementation: - `generate` takes a lowered `GenerateRequest` and streams raw `GenerateOutput`s; detokenization and stop strings stay above it. - `info()` returns `LlmInfo`, the model and engine facts fixed at creation that the upper layers read (context length, model dtype, LoRA support, vLLM version). - Health is two signals, as on the engine-core client: `subscribe_health` turns `false` only on a permanent failure (liveness), while `subscribe_readiness` follows whether new requests can be taken now, such as while engines are paused or asleep. The gRPC health services now read both from the `Llm`. - The trait requires `Any`. Callers that need engine-core specifics, such as the server's admin and utility routes, downcast to `EngineCoreLlm`, so the trait itself does not expose the engine-core client. - New `vllm_llm::Error` variants let implementations that are not backed by engine-core report rejected requests, unsupported fields, unavailability, and remote failures; `vllm-text` classifies the first two as request validation errors. `TextLlm` now holds a `Box<dyn Llm>`, and `ChatLlm` and the server read these facts from `LlmInfo`. No behavior changes. Co-authored-by: Sage Ahrac <80211083+sagearc@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CJckCBxv8Gtnq23avKQwau Signed-off-by: Bugen Zhao <i@bugenzhao.com>
BugenZhao
force-pushed
the
bz/engine-client-trait
branch
from
November 4, 2026 08:36
8de8a5d to
3b03253
Compare
…mm limits (vllm-project#65689) Signed-off-by: cjackal <44624812+cjackal@users.noreply.github.com>
…k merge (vllm-project#64129) Signed-off-by: NickLucche <nicolo.lucchesi@mistral.ai>
…llm-project#65537) Signed-off-by: Yifei Wang <yifei.w@inferact.ai> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…es (vllm-project#59747) Signed-off-by: Luca Motz <luca.motz@icloud.com>
…llm-project#64782) Signed-off-by: Eugene Rakhmatulin <erakhmatulin@nvidia.com> Signed-off-by: Eugene Rakhmatulin <eugr@eugr.com> Co-authored-by: Codex <noreply@openai.com>
…% GPU Memory saved for each draft model (vllm-project#65198) Signed-off-by: yewentao256 <zhyanwentao@126.com>
…space creation (vllm-project#65522) Signed-off-by: Matthew Bonanni <mbonanni@redhat.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…~ 7.6% E2E Throughput Improvement (vllm-project#64760) Signed-off-by: yewentao256 <zhyanwentao@126.com> Co-authored-by: vllm-agent <claw@inferact.ai> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai> Signed-off-by: James E T Smith <11277676+jamesETsmith@users.noreply.github.com> Signed-off-by: jamesETsmith <james.smith9113@gmail.com> Co-authored-by: Woosuk Kwon <woosuk@inferact.ai> Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com> Co-authored-by: Bugen Zhao <i@bugenzhao.com> Co-authored-by: Lain <fusiyuan2000@gmail.com> Co-authored-by: kaiwu-reflection <kai@reflection.ai> Co-authored-by: neilkg <33635204+neilkg@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: James E T Smith <11277676+jamesETsmith@users.noreply.github.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…Humming (vllm-project#65542) Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…vllm-project#65540) Signed-off-by: mgoin <mgoin64@gmail.com> Signed-off-by: Misha Goin <mgoin64@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…equests (vllm-project#65399) Signed-off-by: Jakub Zakrzewski <jzakrzewski@nvidia.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…ject#55688) Signed-off-by: Andrii Skliar <askliar@nvidia.com> Co-authored-by: Andrii Skliar <askliar@nvidia.com> Co-authored-by: vllm-agent <claw@inferact.ai> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…llm-project#59526) Signed-off-by: Tahsin Tunan <tahsintunan@gmail.com>
…rk, 960MB GPU memory saved each rank (vllm-project#65553) Signed-off-by: yewentao256 <zhyanwentao@126.com> Co-authored-by: vllm-agent <claw@inferact.ai> Co-authored-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
vllm-project#62881) Signed-off-by: Dudi Lester <dudi.lester@intel.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…oject#64479) Signed-off-by: Guancheng Fu <guancheng.fu@intel.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
…tic sharding (vllm-project#65585) Signed-off-by: Thang Nguyen <thangnguyenvn647@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ith spawned engines (vllm-project#65234) Signed-off-by: Thang Nguyen <thangnguyenvn647@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ct#64677) Signed-off-by: CharlesWu <Charles.Wu@amd.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com> Co-authored-by: CharlesWu <Charles.Wu@amd.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: vllm-agent <claw@inferact.ai> Co-authored-by: Claude <noreply@anthropic.com>
…ject#65552) Signed-off-by: khluu <khluu000@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… persistent buffer (vllm-project#65598) Signed-off-by: Bo Pang <bopang@inferact.ai> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…llm-project#60895) Signed-off-by: Canlin <canlinguosdu@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…ends (vllm-project#60762) Signed-off-by: xzwgit <57032909+xzwgit@users.noreply.github.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…ction end (vllm-project#65237) Signed-off-by: Ouail Bendidi <ouail.bendidi@gmail.com> Signed-off-by: Juntian Liu <Juntianl777@gmail.com> Signed-off-by: Yifan Qiao <yifanqiao@inferact.ai> Co-authored-by: Ouail Bendidi <ouail.bendidi@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Yifan Qiao <yifanqiao@inferact.ai> Co-authored-by: Codex <noreply@openai.com>
…llm-project#65593) Signed-off-by: CJJ1008 <843515223@qq.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai>
Signed-off-by: Alex-Wengg <hanweng9@gmail.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai>
…ayers on MI355X (vllm-project#63027) Signed-off-by: chao-xu-spec <chaox@amd.com> Co-authored-by: Douglas Lehr <91553416+dllehr-amd@users.noreply.github.com>
…lm-project#65763) Signed-off-by: khluu <khluu000@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…llm-project#65753) Co-authored-by: v <v@inferact.ai> Co-authored-by: Woosuk Kwon <woosuk@inferact.ai> Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
…65773) Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream: vllm-project#64695. This fork PR stays as the base of the stack below.
Motivation
TextLlmowns a concreteLlm, the token-level facade over the engine-core client, so the server, chat, and text layers can only run over engine-core. Frontends that put a network hop between the API layer and the engine, such as a router frontend in front ofvllm-rs serveworkers or a tokens-in/tokens-out gateway (vllm-project#63887), want to reuse rendering, tokenization, detokenization, and parsing while supplying their own generation backend.This PR makes the
Llmlayer an interface: a loweredGenerateRequestgoes in, rawGenerateOutputs come out. Detokenization (with per-token attribution) and stop strings stay with the caller, so the parsers keep their full input regardless of where the engine runs.Changes
LlmtoEngineCoreLlm(first commit, pure rename), soLlmcan name the interface. In the Rust frontend, "engine" means engine-core; naming the interfaceEngineClientafter Python would read as a synonym ofEngineCoreClient.vllm_llm::Llm: the generate/abort subset of Python'sEngineClient, plusinfo(), health, andshutdown().EngineCoreLlmimplements it.LlmInfo: model and engine facts fixed at creation that the upper layers read (effective context length, model dtype, LoRA support, vLLM version).model_dtypeis optional; without it, multimodal inputs are rejected.Anyand does not expose the engine-core client. The server's admin and utility routes downcast toEngineCoreLlmto reach it, so they keep working unchanged.vllm_llm::ErrorgainsUnsupported,Unavailable,RemoteInvalidRequest, andRemote. The existing variants all describe engine-core failures, so an implementation backed by something else had nothing to return.vllm-textclassifies the first and third as request validation errors and addsis_unavailable();vllm-chatforwards it.TextLlmholds aBox<dyn Llm>and exposes it asllm(), replacingengine_core_client();ChatLlmand the server read facts fromLlmInfo.ChatLlm::engine_core_client()is removed.No behavior changes: the server still always builds an
EngineCoreLlm.Stack
Llmtrait #82:Llmtrait and error contract (this PR)Llm#83: HTTP API over anyLlmLlmover an internal MessagePack gRPC service #84: internal MessagePack gRPC remoteLlmValidation
cargo clippy --workspace --all-targets --all-features,cargo fmt --check: clean, on both commits.cargo nextest run -p vllm-llm -p vllm-text -p vllm-chat -p vllm-server -p vllm-cmd -p vllm-bench: 1417 passed.Open questions
Unsupportedcarries the field name for the OpenAI errorparam; it could fold into the invalid-request class.🤖 Generated with Claude Code
https://claude.ai/code/session_01CJckCBxv8Gtnq23avKQwau