fix: convert conditional disagg sglang warning to httperror 400 - #12578
Merged
Conversation
Signed-off-by: Karen Chung <karenc@nvidia.com>
|
🎯 Code Coverage (details) 🔗 Commit SHA: 75b192d | Docs | Datadog PR Page | Give us feedback! |
Contributor
WalkthroughChangesDecode handler error handling
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
components/src/dynamo/sglang/request_handlers/llm/decode_handler.py (1)
50-54: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the new
HttpErrorpath.
generatenow raisesHttpErrorfor this request condition, but itsRaisessection still lists onlyRuntimeErroron Lines 354-356. Add the HTTP 400 behavior to the docstring.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@components/src/dynamo/sglang/request_handlers/llm/decode_handler.py` around lines 50 - 54, Update the generate method’s docstring Raises section to document the new HttpError behavior: it raises HTTP 400 when BYPASS_REMOTE_PREFILL_ANNOTATION is requested but unsupported by the SGLang backend. Preserve the existing RuntimeError documentation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@components/src/dynamo/sglang/request_handlers/llm/decode_handler.py`:
- Around line 50-54: Update the streaming HTTP configuration so the
status-preserving pre-commit error peek is enabled by default, allowing the
HttpError raised in DecodeWorkerHandler.generate for
BYPASS_REMOTE_PREFILL_ANNOTATION to produce HTTP 400 instead of a committed 200.
Add an endpoint test covering x-bypass-remote-prefill that asserts the 400
response and includes the conditional-disaggregation guidance message.
---
Nitpick comments:
In `@components/src/dynamo/sglang/request_handlers/llm/decode_handler.py`:
- Around line 50-54: Update the generate method’s docstring Raises section to
document the new HttpError behavior: it raises HTTP 400 when
BYPASS_REMOTE_PREFILL_ANNOTATION is requested but unsupported by the SGLang
backend. Preserve the existing RuntimeError documentation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: e12f2c19-4edc-4794-94e1-1d2e6413c840
📒 Files selected for processing (1)
components/src/dynamo/sglang/request_handlers/llm/decode_handler.py
Signed-off-by: Karen Chung <karenc@nvidia.com>
karen-sy
enabled auto-merge (squash)
August 4, 2026 00:57
connorcarpenter15
approved these changes
Aug 4, 2026
1 task
hhzhang16
added a commit
that referenced
this pull request
Aug 4, 2026
dyn-3691-extract-shared-target-pid-cuda-customstorage-operation-layer * 'main' of https://github.com/ai-dynamo/dynamo: (50 commits) docs(cli): correct removed vLLM prefill-worker flag reference (#12581) docs(operator): reserve webhook Ignore for emergencies (#12563) ci(docs): make previews and checks match what actually publishes (#12339) refactor(vllm): organize custom encoder modules (#12416) feat(llm): Select reasoning output field via env var (#11464) feat(runtime): add TLS support to TCP request plane (#10921) fix: convert conditional disagg sglang warning to httperror 400 (#12578) feat(operator): add runtime feature gates (#12421) refactor(runtime): extract PushRouter transport seam behind StreamingDispatch trait (#12447) feat(replay): add deterministic canonical offline reports (#12363) build: bump ModelExpress to 0.5.0(OPS-7978) (#12455) fix(mocker): use logical KV tokens for decode timing (#12583) fix(examples): update Triton example for CUDA 13 + fix libdcgm copy (DYN-3697) (#12577) refactor(operator): implement composition-first DGD reconciliation (#12283) feat(frontend): add basetenkenizer backend (#12376) fix(profiler): configure rapid mocker without planner (#12573) docs(vllm): correct worker-role flags and document --kv-transfer-config (#12568) ci: add Kubernetes deploy test to nightly (#12090) fix(container): reuse pinned protoc in runtime image (#12535) feat(self-host): flip DYN_SELF_HOST_METADATA default to ON (gh-8749) (#11417) ... Signed-off-by: Hannah Zhang <hannahz@nvidia.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.
Overview:
The SGLang backend correctly rejects the conditional-disaggregation annotation
x-bypass-remote-prefilland raises a message written specifically for the user:That message is present in full in both the worker log and the frontend log, but the client receives:
{"message":"Internal server error","type":"Internal Server Error","code":500}The backend expresses the rejection as a bare RuntimeError, which the frontend classifies as 5xx, and 5xx bodies are deliberately replaced with a generic message by SanitizedError. The result: the one sentence that tells the user which backend to switch to never reaches them.From the caller's point of view a self-correctable configuration mistake presents as an unattributable internal server error.
Details:
Where should the reviewer start?
Related Issues
🔗 This PR is linked to an issue:
Summary by CodeRabbit