Skip to content

[sgl-router] Fail fast on prefill errors and isolate PD transfer groups - #40606

Closed
sherlockwu wants to merge 1 commit into
codex/router-engine-abortfrom
codex/router-pd-failfast-groups
Closed

sherlockwu wants to merge 1 commit into
codex/router-engine-abortfrom
codex/router-pd-failfast-groups

Conversation

@sherlockwu

@sherlockwu sherlockwu commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

A failed prefill leaves decode waiting for KV that will never arrive. PD selection also needs to keep incompatible transfer groups apart.

Modifications

Wait for prefill's outcome alongside decode; preserve prefill 4xx responses and return 502 prefill_failed for transport/server failures, dropping decode immediately. Prefill remains detached on client cancellation.

Read the EndpointSlice sglang.ai/transfer-group label (configurable with --transfer-group-label). Both routing paths select compatible pairs, exclude orphan prefills, and readiness requires a complete pair. Unlabeled workers pair only with unlabeled workers; label changes refresh discovery.

Stacked on #40605, which follows #40604. Most touched files only initialize the new worker metadata field.

Accuracy Tests

Workspace library and integration tests passed, including focused regressions for prefill failures, released load guards, group isolation, readiness, bucket routing, and discovery updates. Updated the old test that expected prefill failures to be hidden. Strict workspace Clippy and formatting passed.

Speed Tests and Profiling

Not run; no inference changes.


CI States

Latest PR Test (Base): ✅ Run #35682350023
Latest PR Test (Extra): ❌ Run #35682349542
Latest PR Test (AMD ROCm 10): ➖ No AMD PR run found for this commit.

@github-actions github-actions Bot added documentation Improvements or additions to documentation npu labels Sep 21, 2026
@sherlockwu
sherlockwu force-pushed the codex/router-pd-failfast-groups branch from ae98b27 to 110ca27 Compare September 21, 2026 17:35
@sherlockwu
sherlockwu added this pull request to stack #40625 September 21, 2026 20:36
@sherlockwu
sherlockwu marked this pull request as draft September 21, 2026 20:47
@sherlockwu
sherlockwu force-pushed the codex/router-pd-failfast-groups branch from 110ca27 to ab2747b Compare September 21, 2026 22:39
@ShangmingCai
ShangmingCai force-pushed the codex/router-pd-failfast-groups branch from ab2747b to 8a7a482 Compare September 22, 2026 03:13
sherlockwu added a commit that referenced this pull request Sep 29, 2026
Extract fail-fast forwarding from #40606 (8a7a482). Reuse the abort-on-drop implementation on main with safe router-generated PD request IDs; leave prefill detached. Exercise reorg failures before decode headers and after its SSE pump starts.
sherlockwu added a commit that referenced this pull request Sep 29, 2026
Consolidate discovery and grouping from #41487 (67f6f7b) with bucket-scoped pairing from #40606 (8a7a482). Support both routing paths, require a complete same-bucket pair for reorg readiness, and preserve bootstrap metadata recovery.
sherlockwu added a commit that referenced this pull request Sep 29, 2026
Extract fail-fast forwarding from #40606 (8a7a482). Reuse the abort-on-drop implementation on main with safe router-generated PD request IDs; leave prefill detached. Exercise reorg failures before decode headers and after its SSE pump starts.
sherlockwu added a commit that referenced this pull request Sep 29, 2026
Consolidate discovery and grouping from #41487 (67f6f7b) with bucket-scoped pairing from #40606 (8a7a482). Support both routing paths, require a complete same-bucket pair for reorg readiness, and preserve bootstrap metadata recovery.
sherlockwu added a commit that referenced this pull request Sep 29, 2026
Extract fail-fast forwarding from #40606 (8a7a482). Reuse the abort-on-drop implementation on main with safe router-generated PD request IDs; leave prefill detached. Exercise reorg failures before decode headers and after its SSE pump starts.
sherlockwu added a commit that referenced this pull request Sep 29, 2026
Consolidate discovery and grouping from #41487 (67f6f7b) with bucket-scoped pairing from #40606 (8a7a482). Support both routing paths, require a complete same-bucket pair for reorg readiness, and preserve bootstrap metadata recovery.
sherlockwu added a commit that referenced this pull request Oct 1, 2026
Consolidate discovery and grouping from #41487 (67f6f7b) with bucket-scoped pairing from #40606 (8a7a482). Support both routing paths, require a complete same-bucket pair for reorg readiness, and preserve bootstrap metadata recovery.
ShangmingCai pushed a commit that referenced this pull request Oct 1, 2026
Extract fail-fast forwarding from #40606 (8a7a482). Reuse the abort-on-drop implementation on main with safe router-generated PD request IDs; leave prefill detached. Exercise reorg failures before decode headers and after its SSE pump starts.
ShangmingCai pushed a commit that referenced this pull request Oct 1, 2026
Extract fail-fast forwarding from #40606 (8a7a482). Reuse the abort-on-drop implementation on main with safe router-generated PD request IDs; leave prefill detached. Exercise reorg failures before decode headers and after its SSE pump starts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation npu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants