Repository navigation
refactor(runtime): share backend supervision and output capture - #14647
Merged
Merged
Conversation
Move the writer lock, backend supervision with its memory sampler and readiness task, the route-filter supervision, output capture, and credential loading into the execution module, so later managed runtimes can reuse them. vLLM adopts all of them and Ollama adopts the writer lock. Error messages and forwarded output are unchanged. Extracted from #14611. Co-authored-by: Prekshi Vyas <[email protected]>
Collaborator
Author
Authoring session — opening
|
Co-authored-by: Prekshi Vyas <[email protected]>
Contributor
cv
enabled auto-merge (squash)
November 19, 2026 09:26
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.
Moves vLLM's backend supervision, output capture, writer lock, and credential loading into the runtime's shared
executionmodule, so later managed runtimes reuse them instead of copying vLLM's. Runtime behavior, error messages, and forwarded backend output don't change.Problem
The vLLM runtime owns its writer lock, memory sampler and readiness task, route-filter supervision, output capture, and credential loading, and Ollama repeats the writer lock. A new managed runtime, such as the llama.cpp and NIM runtimes in #14611, would copy them again.
Part of #14556. Extracted from #14611, which can rebase onto this change.
Change
execution::lockopens a lock file and takes its exclusive writer lock with the caller's error messages; vLLM's storage and credential locks and Ollama's storage lock use it.execution::serveruns the memory sampler and readiness task, supervises the backend with or without a route filter, and explains its exit from its output.execution::supervisor::with_filteris vLLM's route-filter supervision, moved fromvllm/runtime/routes.rs.execution::output::Outputis vLLM's output capture, moved fromvllm/runtime/process.rs; it still redacts the one bearer key.vllm/runtime/authentication.rsmoves unchanged toexecution/authentication.rs.Ollama keeps its own sampler loop, because its readiness failures feed the sample stream. Streaming output filtering, which only NIM needs, stays in #14611.