feat(sglang): add native gRPC sidecar with disaggregation - #3
Closed
connorcarpenter15 wants to merge 8 commits into
Closed
connorcarpenter15 wants to merge 8 commits into
connorcarpenter15 wants to merge 8 commits into
Conversation
added 7 commits
July 8, 2026 09:57
Add a sidecar integration for SGLang in Dynamo: a native SGLang engine (`sglang.launch_server --openengine-port`) runs the model, and a separate Dynamo worker drives it over the vendor-neutral OpenEngine v1 gRPC contract — the same process-separation shape as the vLLM sidecar, over OpenEngine. New crate `lib/sglang-sidecar` (`[[bin]] dynamo-sglang-sidecar`), a `dynamo_backend_common::LLMEngine` impl with no `sglang` dependency. It is endpoint-only configured (`--openengine-endpoint`); model, role, parallelism, KV block config, and KV event sources are all discovered from the engine over OpenEngine RPCs. Disaggregation reuses the shared `disagg` helper, relaying SGLang's bootstrap triple through the typed `KvSessionRef.attributes_struct`. backend-common re-exports `MultimodalData`/`MultimodalDataMap`/ `RoutingHints` for the sidecar; the crate is registered in the workspace. Aggregated launch script under examples/backends/sglang/launch. The in-process backend (`dynamo.sglang`) is unchanged; the sidecar lives alongside it. Signed-off-by: Connor Carpenter <connorc@nvidia.com>
Wire the sidecar's OpenEngine client to the contract additions (vendored proto is additive within openengine.v1): - build_generate_request fills GenerateRequest.guided (from sampling_options.guided_decoding), lora_name (routing hint), and the logprobs controls (output_options.logprobs / prompt_logprobs). - The generate stream maps TokenOutput.logprobs / top_logprobs back into LLMEngineOutput.log_probs / top_logprobs. - from_args copies the engine-advertised ModelInfo.reasoning_parser / tool_call_parser into WorkerConfig so registration carries them to the frontend (tool-call / reasoning parsing for sidecar-served models). - backend-common re-exports TopLogprob for the mapping. Signed-off-by: Connor Carpenter <connorc@nvidia.com>
Signed-off-by: Connor Carpenter <connorc@nvidia.com>
Signed-off-by: Connor Carpenter <connorc@nvidia.com>
Signed-off-by: Connor Carpenter <connorc@nvidia.com>
Signed-off-by: Connor Carpenter <connorc@nvidia.com>
Signed-off-by: Connor Carpenter <connorc@nvidia.com>
connorcarpenter15
force-pushed
the
feat/sglang-sidecar-grpc
branch
from
July 8, 2026 16:57
e231171 to
59e7272
Compare
connorcarpenter15
had a problem deploying
to
external_collaborator
July 8, 2026 16:57 — with
GitHub Actions
Failure
Signed-off-by: Connor Carpenter <connorc@nvidia.com>
connorcarpenter15
had a problem deploying
to
external_collaborator
July 8, 2026 17:13 — with
GitHub Actions
Failure
Owner
Author
|
Superseded by ai-dynamo#11408. |
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.
Overview:
Add a standalone Dynamo SGLang sidecar that communicates with SGLang through its native gRPC server. The sidecar supports both aggregated serving and prefill/decode disaggregation while keeping the SGLang engine in a separate process.
This is currently based on the gRPC/disaggregation handling in sgl-project/sglang#30440.
Details:
dynamo-sglang-sidecarRust binary and library.Where should the reviewer start?
lib/sglang-sidecar/src/engine.rsfor request handling, worker registration, and disaggregated execution.lib/sglang-sidecar/src/client.rsfor the native SGLang gRPC client.examples/backends/sglang/launch/sidecar_disagg.shfor the prefill/decode topology.Validation:
cf2aab82a3c5342f6bc89b7bae47a078ace1149c.e2311713388f5708405766ddea9bfecdd8c694b3.main.cargo check -p dynamo-sglang-sidecarsuccessfully through the local checkout source path.ddb22bf002a8def8e1ebcaa0b429aaac5607663f.Qwen/Qwen3-0.6B.3023079completed with exit code0:0.Related Issues
🚫 This PR is NOT linked to an issue: