fix(onboard): warn on risky Spark vLLM servers#6770
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds DGX Spark-specific vLLM headroom warnings, managed-container ownership detection, protection against conflicting managed installs, expanded tests, and troubleshooting guidance for memory-pressure failures. ChangesDGX Spark vLLM onboarding
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant SetupNim
participant ExistingVllM
participant SetupNimVllmHandler
participant DockerInspector
Operator->>SetupNim: select vLLM provider
SetupNim->>ExistingVllM: check port availability
ExistingVllM-->>SetupNim: return running status
SetupNim->>SetupNimVllmHandler: pass managedInstall and sparkHost
SetupNimVllmHandler->>ExistingVllM: read model metadata
ExistingVllM-->>SetupNimVllmHandler: return model and context settings
SetupNimVllmHandler->>DockerInspector: inspect managed container label
DockerInspector-->>SetupNimVllmHandler: return ownership status
SetupNimVllmHandler-->>Operator: emit headroom warning when applicable
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
7fcc0bf to
d3bcc89
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/inference/set-up-vllm.mdx (1)
45-50: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCross-link the two DGX Spark headroom write-ups. The new Warning in
set-up-vllm.mdxand the new troubleshooting section introubleshooting.mdxdescribe the same risk (NVRM NV_ERR_NO_MEMORY, host freeze, same serve-flag reductions) but neither references the other, so a reader landing on one has no signposted path to the other.
docs/inference/set-up-vllm.mdx#L45-L50: add a route-style link from the Warning (or the "Related Topics" list at lines 157-161) to the troubleshootingdgx-sparkanchor for full diagnostics/recovery steps.docs/reference/troubleshooting.mdx#L2189-L2223: add a route-style link back to theset-up-vllm.mdx"Use an Existing Server" section for the initial onboarding-time warning context.Resolve both links against the Fern published routes in
docs/index.yml(not filesystem-relative paths) before adding them.🤖 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 `@docs/inference/set-up-vllm.mdx` around lines 45 - 50, Cross-link the DGX Spark guidance at both sites: in docs/inference/set-up-vllm.mdx lines 45-50, add a route-style link from the Warning or Related Topics to the troubleshooting dgx-spark anchor; in docs/reference/troubleshooting.mdx lines 2189-2223, add a route-style link back to the set-up-vllm.mdx “Use an Existing Server” section. Resolve both URLs using the Fern routes in docs/index.yml, not filesystem-relative paths.Source: Path instructions
🤖 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.
Nitpick comments:
In `@docs/inference/set-up-vllm.mdx`:
- Around line 45-50: Cross-link the DGX Spark guidance at both sites: in
docs/inference/set-up-vllm.mdx lines 45-50, add a route-style link from the
Warning or Related Topics to the troubleshooting dgx-spark anchor; in
docs/reference/troubleshooting.mdx lines 2189-2223, add a route-style link back
to the set-up-vllm.mdx “Use an Existing Server” section. Resolve both URLs using
the Fern routes in docs/index.yml, not filesystem-relative paths.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f567cea9-7ec8-41e6-89f8-ffcd4b09ada8
📒 Files selected for processing (7)
docs/inference/set-up-vllm.mdxdocs/reference/troubleshooting.mdxsrc/lib/onboard.tssrc/lib/onboard/setup-nim-flow.test.tssrc/lib/onboard/setup-nim-flow.tssrc/lib/onboard/setup-nim-vllm.test.tssrc/lib/onboard/setup-nim-vllm.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/onboard/setup-nim-vllm.ts (1)
32-32: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winLarge-model detection heuristic has narrow size coverage.
LARGE_MODEL_PATTERNonly matches35b,70b,120b, andsuper, so common large checkpoints (e.g.34b,40b,72b,180b,405b) won't trigger the headroom warning, silently defeating the feature's purpose for those models.♻️ Suggested generalization using a numeric threshold
-const LARGE_MODEL_PATTERN = /(?:^|[-_/])(?:35b|70b|120b|super)(?:$|[-_/])/i; +const LARGE_MODEL_SIZE_PATTERN = /(?:^|[-_/])(\d+)b(?:$|[-_/])/i; +const LARGE_MODEL_SIZE_THRESHOLD_B = 30;Then in
buildDgxSparkExistingVllmHeadroomWarning, replace the boolean test with a parsed comparison againstLARGE_MODEL_SIZE_THRESHOLD_B(falling back to thesuperkeyword check).🤖 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 `@src/lib/onboard/setup-nim-vllm.ts` at line 32, Generalize LARGE_MODEL_PATTERN to recognize numeric model-size segments at or above the chosen threshold while retaining the super keyword match. Add or use LARGE_MODEL_SIZE_THRESHOLD_B, and update buildDgxSparkExistingVllmHeadroomWarning to parse the matched numeric size and compare it against that threshold, falling back to the super check.
🤖 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.
Nitpick comments:
In `@src/lib/onboard/setup-nim-vllm.ts`:
- Line 32: Generalize LARGE_MODEL_PATTERN to recognize numeric model-size
segments at or above the chosen threshold while retaining the super keyword
match. Add or use LARGE_MODEL_SIZE_THRESHOLD_B, and update
buildDgxSparkExistingVllmHeadroomWarning to parse the matched numeric size and
compare it against that threshold, falling back to the super check.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 185517bc-30dd-48a5-ac4f-f03611a4247a
📒 Files selected for processing (7)
docs/inference/set-up-vllm.mdxdocs/reference/troubleshooting.mdxsrc/lib/onboard.tssrc/lib/onboard/setup-nim-flow.test.tssrc/lib/onboard/setup-nim-flow.tssrc/lib/onboard/setup-nim-vllm.test.tssrc/lib/onboard/setup-nim-vllm.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- src/lib/onboard/setup-nim-flow.ts
- src/lib/onboard.ts
- docs/inference/set-up-vllm.mdx
- src/lib/onboard/setup-nim-flow.test.ts
- src/lib/onboard/setup-nim-vllm.test.ts
- docs/reference/troubleshooting.mdx
787e0bf to
849ebdd
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@src/lib/onboard/setup-nim-vllm.test.ts`:
- Around line 147-154: Add a test case alongside the existing large-model
warning test that uses a 30B model and asserts
buildDgxSparkExistingVllmHeadroomWarning includes that model identifier. Keep
the assertion focused on the warning behavior so the inclusive threshold is
covered without locking in implementation details.
🪄 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: 63b4142b-76d5-4718-91fa-feb7d3774fd5
📒 Files selected for processing (7)
docs/inference/set-up-vllm.mdxdocs/reference/troubleshooting.mdxsrc/lib/onboard.tssrc/lib/onboard/setup-nim-flow.test.tssrc/lib/onboard/setup-nim-flow.tssrc/lib/onboard/setup-nim-vllm.test.tssrc/lib/onboard/setup-nim-vllm.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- src/lib/onboard.ts
- docs/inference/set-up-vllm.mdx
- src/lib/onboard/setup-nim-flow.ts
- docs/reference/troubleshooting.mdx
- src/lib/onboard/setup-nim-flow.test.ts
- src/lib/onboard/setup-nim-vllm.ts
Signed-off-by: HwangJohn <angelic805@gmail.com>
849ebdd to
3fa3814
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
✨ Thanks for the fix, @HwangJohn. Adding a DGX Spark-specific warning for risky BYO vLLM servers should give operators clearer headroom guidance before memory pressure causes host issues. Ready for maintainer review. |
cjagwani
left a comment
There was a problem hiding this comment.
Reviewed exact head 3fa3814. The standard checks are green, but the new Spark safety warning has four correctness blockers:
-
src/lib/onboard.ts:1093-1097 uses firmware-only detectNvidiaPlatform(), while the existing GPU path can classify firmware-unknown NVIDIA GB10 as Spark (src/lib/inference/nim.ts:583-613). Thread the already-detected gpu.platform/gpu.spark result into this handler and test empty firmware + GB10 through the real flow.
-
src/lib/onboard/setup-nim-vllm.ts:67-76 returns before evaluating max_model_len unless the model ID first looks large and unquantized. Long context is therefore not an independent trigger; the current NVFP4+262144 test codifies behavior that contradicts both updated docs. Trigger on longContext || riskyLargeModel and add 131071/131072, small-model, and quantized-model long-context boundaries.
-
src/lib/onboard/setup-nim-vllm.ts:32-36,51-69,123-146 treats /v1/models[].id as authoritative size/quantization metadata, but vLLM permits arbitrary served-model aliases and separate quantization configuration. Unknown or misleading aliases can suppress a safety warning, and the warning claims 'unquantized' without proof. Use stronger metadata where available, never treat an alias/suffix as proof of safety, phrase residual classification as heuristic, and test arbitrary aliases, misleading suffixes, root metadata, and config-based quantization.
-
src/lib/onboard/setup-nim-flow.ts:554-590 and provider-host-state.ts:110-115 define 'managed' only for this invocation. A NemoClaw-managed server becomes indistinguishable from BYO on re-onboard, and the remediation env is ignored while a server already occupies the endpoint. Determine ownership durably or remove ownership claims; tell users to stop the existing server before selecting managed install; test managed re-onboard/resume and occupied-port remediation.
After fixes, rerun required cloud-onboard, onboard-repair, and onboard-resume exact-head E2E; add the advised Spark BYO/managed-handoff/re-onboard/routing cleanup scenario.
- Thread gpu.spark through handleVllmSelection via sparkHost option so firmware-unknown GB10 hosts are correctly identified as DGX Spark - Make long context an independent warning trigger; quantized models with very long max_model_len now warn (KV cache exhausts unified memory) - Adjust warning text to declare heuristic nature of alias-based classification; add tests for arbitrary and misleading aliases - Log an occupied-port advisory when install-vllm is selected while vLLM is already running; document re-onboard ownership limitation inline
Verifies that gpu.spark=true on the SetupNim call threads through as sparkHost:true to handleVllmSelection, covering the firmware-unknown GB10 path that detectNvidiaPlatform() alone cannot reach.
|
Addressing cjagwani's four blockers in commit f3554cd (two commits on HEAD). Notes on B3 and B4 where the implementation diverges from the review request: B3 — alias as authoritative metadata The B4 — managed ownership durability across sessions Durable ownership persistence (a marker file written on managed install and read on re-onboard) is not added in this PR. The warning is advisory, not a gate. On re-onboard, the operator explicitly selects the vLLM menu entry labeled "— running," signaling awareness that the server is active. A false-positive advisory warning on a NemoClaw-managed re-onboard is less harmful than a false-negative on a risky BYO server with an unrecognized alias. The re-onboard limitation is documented inline at the |
✅ Action performedReview finished.
|
|
/ok to test 86a63d2 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
/ok to test ba4511a |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai resume |
✅ Action performedReviews resumed. |
|
@cjagwani ready for exact-head re-review at All four requested correctness boundaries are addressed: the real flow threads the already-detected Exact-head regular CI is green, CodeRabbit has no unresolved threads, and both Advisor lanes are clean at 0/0/0. Focused ownership/onboarding coverage is 95/95 locally. Trusted E2E dispatch is currently blocked by the base-branch controller crash tracked in #6823; the failing gate executes broken |
## Summary - replace the unsupported TypeScript constructor parameter property in the PR E2E gate - add a regression that launches the controller with the exact `node --experimental-strip-types` runtime used by Actions ## Why Current `main` crashes every PR E2E gate during initialization with `ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX`, before it can evaluate the PR. This is visible on #6770, #6711, and #6672. ## Validation - `npx vitest run --project integration test/pr-e2e-gate-command.test.ts test/pr-e2e-gate-lifecycle.test.ts test/pr-e2e-gate-exceptions.test.ts test/pr-e2e-gate.test.ts test/pr-e2e-gate-workflow.test.ts` (108 passed) - `npm run build:cli` - pre-commit and pre-push hooks <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved validation for invalid end-to-end gate modes, including clearer error messaging and the correct failure status. * Prevented unsupported TypeScript syntax errors when running the gate command directly in Node’s experimental type-stripping mode. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
/ok to test 63cfe98 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Exact-head re-review request for All four requested correctness areas are now covered: firmware-unknown GB10 uses the already-detected Spark classification; long context is an independent inclusive trigger; aliases are never treated as proof of size/quantization; and managed vLLM ownership is durable with fail-closed occupied-port handling and ID-scoped cleanup. The focused 95-test set and full The remaining machine gate is the expected fork safety exception: credential-bearing E2E jobs cannot execute fork code. Gate run 29305035858 requests a no-secret exception for this exact head/base. @cjagwani, please re-review the addressed findings. @cv @ericksoa, please approve |
|
New exact head after the main-only merge: The remaining policy gate requires a maintainer fork exception for this exact revision: controller run 29308287855. @cv @ericksoa, please approve the protected environment or run the |
Signed-off-by: HwangJohn <angelic805@gmail.com>
Signed-off-by: HwangJohn <angelic805@gmail.com>
cjagwani
left a comment
There was a problem hiding this comment.
Approved exact head 14d59fd after maintainer review. This is maintenance of the existing supported DGX Spark local/managed vLLM surface, not a new integration. Required CI and the exact-head/base E2E gate are green; DCO and all commits are Verified; ownership handling fails closed and is ID-scoped; focused onboarding/inference tests cover the risky paths; and no actionable CodeRabbit or advisor finding remains. The failed Terra advisor job is an adjudicated tool-protocol failure with zero published findings and is not a required check.
## Summary Add v0.0.83 release notes to `docs/about/release-notes.mdx` for pre-tag release prep. ## Source Summary - #6773 -> `docs/about/release-notes.mdx`: Shared inference route changes are explicit and fail-safe; status shows recorded route, live route, and drift. - #6875 -> `docs/about/release-notes.mdx`: DGX Station GB300 express setup restored; vLLM storage preflight narrowed. - #6770 -> `docs/about/release-notes.mdx`: Risky Spark vLLM server warning during onboarding. - #6856 -> `docs/about/release-notes.mdx`: Re-onboard reuse preserves tier-default brave/tavily presets. - #6867 -> `docs/about/release-notes.mdx`: Unreachable custom endpoint routed through transport-recovery path. - #6860 -> `docs/about/release-notes.mdx`: Rebuild preflight uses model-aware token field for o-series/GPT-5. - #6845 -> `docs/about/release-notes.mdx`: Corporate CA anchored for image build TLS. - #6833 -> `docs/about/release-notes.mdx`: SSH ControlMaster-delegated forwards recognized in fallback. - #6837 -> `docs/about/release-notes.mdx`: Hermes light skin writes via stdin on macOS. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: doc-only release notes - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed - [ ] Non-success, skipped, or missing CI check accepted by maintainer ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub - [x] Normal pre-commit, commit-msg, and pre-push hooks passed - [x] `npm run docs` passes with 0 errors Signed-off-by: Jessica Yaunches <jyaunches@nvidia.com> Signed-off-by: Jessica Yaunches <jyaunches@nvidia.com>
Summary
Adds a DGX Spark-specific warning when onboarding selects an already-running vLLM server that appears to serve a large unquantized model. This gives operators headroom guidance before agent/tool load can surface as
NVRM NV_ERR_NO_MEMORY, SSH loss, or a hard host freeze.The warning is limited to bring-your-own vLLM servers and is suppressed for the managed Spark vLLM handoff, so NemoClaw's validated managed recipe does not warn on itself.
Changes
max_model_lenwhen vLLM exposes it.managedInstalloption through the managed vLLM flow so the BYO-server warning is not emitted afterinstall-vllmsucceeds.Type of Change
Quality Gates
Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailable —npm run check:diffpassed on DGX Spark Linux after building the plugin/CLI artifacts required by CLI typecheck.npx vitest run --project cli src/lib/onboard/setup-nim-vllm.test.ts src/lib/onboard/setup-nim-flow.test.tspassed, 22 tests.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only) — passed on DGX Spark Linux with 0 errors; Fern emitted only the existing upgrade notice.Additional validation:
npx @biomejs/biome check src/lib/onboard/setup-nim-vllm.ts src/lib/onboard/setup-nim-vllm.test.ts src/lib/onboard/setup-nim-flow.ts src/lib/onboard/setup-nim-flow.test.ts src/lib/onboard.tspassed.npm run typecheck:clipassed locally after build artifacts were present.npm run docs:check-agent-variantsandnpm run docs:check-routespassed locally; Fern check returned 0 errors.Qwen/Qwen3.6-35B-A3Bwith a very long context and high memory utilization left minimal unified-memory headroom and had priorNVRM NV_ERR_NO_MEMORYlogs. Restarting with a smaller envelope allowed a smoke request to complete without freezing, which matches the warning/troubleshooting scope.Signed-off-by: HwangJohn angelic805@gmail.com
Summary by CodeRabbit
NVRM NV_ERR_NO_MEMORYfrom risky local vLLM setups, with recovery steps and advice to prefer the managed Spark path.8000is already in use.