From 40e686ee2a011071964503cb124774673fc80017 Mon Sep 17 00:00:00 2001 From: Yanyun Liao Date: Tue, 21 Jul 2026 16:03:09 +0800 Subject: [PATCH 1/7] fix(onboard): auto-select managed vLLM non-interactively on DGX Spark/Station (#7293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On a DGX Spark, `nemoclaw onboard --non-interactive` with no NEMOCLAW_PROVIDER (and no cloud key) fell back to cloud NVIDIA Endpoints (`build` → nvidia-prod) instead of the managed local vLLM (`install-vllm`) that the interactive menu already offers for the platform. The GB10 GPU is detected and the `Install vLLM (DGX Spark)` entry is present in the non-interactive options, but the default-selection logic in resolveRequestedProviderSelection unconditionally chose `build` and never looked at it. Fix: when a non-interactive onboard has no requested/recorded provider and the host is a DGX managed-vLLM-default platform (Spark/Station) whose `install-vllm` entry is present, default to `install-vllm` instead of `build`. The Spark/Station predicate is exported from vllm-menu as `isManagedVllmDefaultPlatform` and reused by both the interactive menu and this non-interactive default so they stay in lock-step. Generic-Linux/experimental hosts and non-DGX platforms keep the cloud `build` default (the entry is either absent or the platform is not a default platform), so no non-Spark regression. Verified live on a DGX Spark (GB10, aarch64): `[3/8]` now prints `[non-interactive] Provider: install-vllm` and selects the Qwen3.6-35B-A3B NVFP4 checkpoint instead of falling back to NVIDIA Endpoints. Signed-off-by: Yanyun Liao --- src/lib/onboard/provider-selection.test.ts | 37 ++++++++++++++++++++++ src/lib/onboard/provider-selection.ts | 14 +++++++- src/lib/onboard/setup-nim-flow.ts | 2 ++ src/lib/onboard/vllm-menu.test.ts | 16 +++++++++- src/lib/onboard/vllm-menu.ts | 15 ++++++--- 5 files changed, 78 insertions(+), 6 deletions(-) diff --git a/src/lib/onboard/provider-selection.test.ts b/src/lib/onboard/provider-selection.test.ts index 13af98d275d..31934465267 100644 --- a/src/lib/onboard/provider-selection.test.ts +++ b/src/lib/onboard/provider-selection.test.ts @@ -128,4 +128,41 @@ describe("resolveRequestedProviderSelection", () => { assert.equal(result.recoveredFromSandbox, false); } }); + + it("auto-selects managed vLLM on a DGX managed-vLLM platform when no provider is given (#7293)", () => { + const result = resolve({ + options: [option("build"), option("install-vllm")], + preferManagedVllmDefault: true, + }); + + assert.equal(result.kind, "selected"); + if (result.kind === "selected") { + assert.equal(result.selected.key, "install-vllm"); + } + }); + + it("keeps the cloud default when the platform is not a managed-vLLM default (#7293)", () => { + // Same options, but the host is not Spark/Station → must stay `build`. + const result = resolve({ + options: [option("build"), option("install-vllm")], + preferManagedVllmDefault: false, + }); + + assert.equal(result.kind, "selected"); + if (result.kind === "selected") { + assert.equal(result.selected.key, "build"); + } + }); + + it("keeps the cloud default when no managed-vLLM entry is available (#7293)", () => { + const result = resolve({ + options: [option("build"), option("openai")], + preferManagedVllmDefault: true, + }); + + assert.equal(result.kind, "selected"); + if (result.kind === "selected") { + assert.equal(result.selected.key, "build"); + } + }); }); diff --git a/src/lib/onboard/provider-selection.ts b/src/lib/onboard/provider-selection.ts index 03164ce359b..3b946aefc6f 100644 --- a/src/lib/onboard/provider-selection.ts +++ b/src/lib/onboard/provider-selection.ts @@ -59,6 +59,13 @@ export interface ResolveRequestedProviderSelectionInput(options: T[], key: string): T | undefined { @@ -118,7 +125,12 @@ export function resolveRequestedProviderSelection( recoveredFromSandbox = true; recoveredModel = input.readRecordedModel(input.sandboxName); } else { - providerKey = "build"; + // Prefer managed local vLLM on DGX Spark/Station when its menu entry is + // present; otherwise fall back to cloud NVIDIA Endpoints (#7293). + providerKey = + input.preferManagedVllmDefault && findOption(input.options, "install-vllm") + ? "install-vllm" + : "build"; } } diff --git a/src/lib/onboard/setup-nim-flow.ts b/src/lib/onboard/setup-nim-flow.ts index 9def65923a5..8b08a38de46 100644 --- a/src/lib/onboard/setup-nim-flow.ts +++ b/src/lib/onboard/setup-nim-flow.ts @@ -27,6 +27,7 @@ import { promptForInferenceProviderSelection } from "./provider-selection-prompt import type { RebuildRouteHandoff, RegistryInferenceRoute } from "./rebuild-route-handoff"; import { prepareProviderDiscovery } from "./setup-nim-provider-discovery"; import type { SetupNimSelectionState as BaseSetupNimSelectionState } from "./setup-nim-selection"; +import { isManagedVllmDefaultPlatform } from "./vllm-menu"; export type SetupNimGpu = ReturnType; export type SetupNimSelectionState = BaseSetupNimSelectionState; @@ -403,6 +404,7 @@ export function createSetupNim( isWindowsHostOllama, windowsHostOllamaSupported: windowsHostOllamaDockerRequirement.supported, hermesProviderAvailable, + preferManagedVllmDefault: isManagedVllmDefaultPlatform(gpu?.platform), ...recordedProviderReaders, }); if (providerSelection.kind === "failure") { diff --git a/src/lib/onboard/vllm-menu.test.ts b/src/lib/onboard/vllm-menu.test.ts index 3564eccce5a..68ed495b0e4 100644 --- a/src/lib/onboard/vllm-menu.test.ts +++ b/src/lib/onboard/vllm-menu.test.ts @@ -5,7 +5,7 @@ import assert from "node:assert/strict"; import { describe, it } from "vitest"; -import { buildVllmMenuEntries } from "./vllm-menu"; +import { buildVllmMenuEntries, isManagedVllmDefaultPlatform } from "./vllm-menu"; describe("buildVllmMenuEntries", () => { it("returns no entries when nothing is running, no profile, and no opt-in", () => { @@ -182,3 +182,17 @@ describe("buildVllmMenuEntries", () => { assert.deepEqual(logs, []); }); }); + +describe("isManagedVllmDefaultPlatform (#7293)", () => { + it("is true for the DGX managed-vLLM default platforms", () => { + assert.equal(isManagedVllmDefaultPlatform("spark"), true); + assert.equal(isManagedVllmDefaultPlatform("station"), true); + }); + + it("is false for other or missing platforms", () => { + assert.equal(isManagedVllmDefaultPlatform("linux"), false); + assert.equal(isManagedVllmDefaultPlatform("jetson"), false); + assert.equal(isManagedVllmDefaultPlatform(null), false); + assert.equal(isManagedVllmDefaultPlatform(undefined), false); + }); +}); diff --git a/src/lib/onboard/vllm-menu.ts b/src/lib/onboard/vllm-menu.ts index 58709a87bee..fd89c75449c 100644 --- a/src/lib/onboard/vllm-menu.ts +++ b/src/lib/onboard/vllm-menu.ts @@ -32,6 +32,15 @@ interface VllmProfileShape { const MANAGED_VLLM_DEFAULT_PLATFORMS = new Set(["spark", "station"]); +/** + * DGX platforms where managed vLLM is the recommended default (not gated behind + * `experimental`). Single source of truth shared by the interactive menu and the + * non-interactive provider default (#7293), so both stay in lock-step. + */ +export function isManagedVllmDefaultPlatform(platform: NvidiaPlatform | null | undefined): boolean { + return platform != null && MANAGED_VLLM_DEFAULT_PLATFORMS.has(platform); +} + export interface VllmMenuEntry { key: "vllm" | "install-vllm"; label: string; @@ -62,8 +71,7 @@ export function buildVllmMenuEntries(opts: BuildVllmMenuOptions): VllmMenuEntry[ ` Note: NEMOCLAW_PROVIDER=install-vllm requested, but vLLM is already running on localhost:${VLLM_PORT} — selecting the running instance.`, ); } - const experimentalLabel = - opts.platform && MANAGED_VLLM_DEFAULT_PLATFORMS.has(opts.platform) ? "" : " [experimental]"; + const experimentalLabel = isManagedVllmDefaultPlatform(opts.platform) ? "" : " [experimental]"; return [ { key: "vllm", @@ -73,8 +81,7 @@ export function buildVllmMenuEntries(opts: BuildVllmMenuOptions): VllmMenuEntry[ } if ( userChoseManagedVllm || - (opts.vllmProfile && - (opts.experimental || (opts.platform && MANAGED_VLLM_DEFAULT_PLATFORMS.has(opts.platform)))) + (opts.vllmProfile && (opts.experimental || isManagedVllmDefaultPlatform(opts.platform))) ) { const verb = opts.hasVllmImage ? "Start" : "Install"; const profileLabel = opts.vllmProfile?.name ?? "no profile detected"; From 5f37a932b3a28a17c582e828c07b3abb46aaa23f Mon Sep 17 00:00:00 2001 From: Yanyun Liao Date: Tue, 21 Jul 2026 16:06:22 +0800 Subject: [PATCH 2/7] test(onboard): avoid added if-statements in provider-selection tests (#7293) The new #7293 cases used `if (result.kind === "selected")` narrowing, which tripped the changed-test-file conditionals guardrail (no added if statements). Replace with a ternary `selectedKey()` accessor so the if-count stays at base. Signed-off-by: Yanyun Liao --- src/lib/onboard/provider-selection.test.ts | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/lib/onboard/provider-selection.test.ts b/src/lib/onboard/provider-selection.test.ts index 31934465267..32cf027db5a 100644 --- a/src/lib/onboard/provider-selection.test.ts +++ b/src/lib/onboard/provider-selection.test.ts @@ -14,6 +14,10 @@ const remoteProviderConfig = { hermesProvider: { providerName: "hermes-provider" }, }; +// Ternary accessor (no `if`, per the changed-test-file conditionals guardrail). +const selectedKey = (result: ReturnType) => + result.kind === "selected" ? result.selected.key : null; + function resolve(overrides: Partial[0]> = {}) { return resolveRequestedProviderSelection({ options: [option("build")], @@ -135,10 +139,7 @@ describe("resolveRequestedProviderSelection", () => { preferManagedVllmDefault: true, }); - assert.equal(result.kind, "selected"); - if (result.kind === "selected") { - assert.equal(result.selected.key, "install-vllm"); - } + assert.equal(selectedKey(result), "install-vllm"); }); it("keeps the cloud default when the platform is not a managed-vLLM default (#7293)", () => { @@ -148,10 +149,7 @@ describe("resolveRequestedProviderSelection", () => { preferManagedVllmDefault: false, }); - assert.equal(result.kind, "selected"); - if (result.kind === "selected") { - assert.equal(result.selected.key, "build"); - } + assert.equal(selectedKey(result), "build"); }); it("keeps the cloud default when no managed-vLLM entry is available (#7293)", () => { @@ -160,9 +158,6 @@ describe("resolveRequestedProviderSelection", () => { preferManagedVllmDefault: true, }); - assert.equal(result.kind, "selected"); - if (result.kind === "selected") { - assert.equal(result.selected.key, "build"); - } + assert.equal(selectedKey(result), "build"); }); }); From ac0882760e30fc98edf9b1fa14468b7a3e9315cf Mon Sep 17 00:00:00 2001 From: Yanyun Liao Date: Tue, 21 Jul 2026 16:45:03 +0800 Subject: [PATCH 3/7] test(onboard): cover the Spark non-interactive managed-vLLM default through the flow (#7293) Address PR Review Advisor PRA-1: the resolver/predicate unit tests exercise the default in isolation, and the existing managed-vLLM flow cases return an explicit getNonInteractiveProvider()=install-vllm, so nothing verified the call-site wiring (preferManagedVllmDefault from gpu?.platform) that makes a DGX Spark non-interactive run with NO requested provider enter the managed-install branch. Add a createSetupNim regression: isNonInteractive true, getNonInteractiveProvider returns null, gpu.platform=spark, install-vllm menu entry present -> asserts installVllm + handleVllmSelection run and the cloud handler is never reached (handleRemoteProviderSelection stays 'unexpected', so a build fallback throws). Signed-off-by: Yanyun Liao --- src/lib/onboard/setup-nim-flow.test.ts | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/lib/onboard/setup-nim-flow.test.ts b/src/lib/onboard/setup-nim-flow.test.ts index e8151790ab1..700907752d8 100644 --- a/src/lib/onboard/setup-nim-flow.test.ts +++ b/src/lib/onboard/setup-nim-flow.test.ts @@ -729,6 +729,58 @@ describe("createSetupNim", () => { }); }); + it("auto-selects managed vLLM on a DGX Spark non-interactive run with no requested provider (#7293)", async () => { + const profile = { name: "DGX Spark" } as VllmProfile; + const prompt = vi.fn(async () => unexpected("provider prompt")); + const detectInferenceProviderHostState = vi.fn(() => + makeHostState({ + vllmProfile: profile, + hasVllmImage: true, + vllmEntries: [{ key: "install-vllm", label: "Start vLLM (DGX Spark)" }], + }), + ); + const installVllm = vi.fn(async (_profile, options) => { + options.beforeInstall?.("vllm-model"); + return { ok: true }; + }); + const routeGuard = vi.fn(() => ({ + requiredModel: null, + requiredEndpointUrl: null, + requiredInferenceApi: null, + })); + const handleVllmSelection = vi.fn(async (state) => { + state.provider = "vllm"; + state.endpointUrl = "http://127.0.0.1:8000/v1"; + state.credentialEnv = null; + state.preferredInferenceApi = "openai-completions"; + return "selected"; + }); + const setupNim = createSetupNim( + makeDeps({ + isNonInteractive: () => true, + // No explicit provider: the DGX Spark platform default must still pick + // managed vLLM instead of falling back to the cloud `build` handler + // (handleRemoteProviderSelection stays `unexpected`, so a fallback throws). + getNonInteractiveProvider: () => null, + prompt, + detectInferenceProviderHostState, + installVllm, + handleVllmSelection, + }), + ); + + const sparkGpu = { platform: "spark" } as unknown as Parameters[0]; + const result = await setupNim(sparkGpu, null, null, true, null, "nemoclaw", routeGuard); + + expect(installVllm).toHaveBeenCalledWith( + profile, + expect.objectContaining({ hasImage: true, nonInteractive: true }), + ); + expect(handleVllmSelection).toHaveBeenCalledOnce(); + expect(prompt).not.toHaveBeenCalled(); + expect(result).toMatchObject({ provider: "vllm" }); + }); + it("threads the DGX Station express model through the standard managed-vLLM selection contract", async () => { const profile = { name: "DGX Station", platform: "station" } as VllmProfile; const servedModel = "nvidia/nemotron-3-ultra-550b-a55b"; From 0b5e0fa0253c3d8e8a1cdeb3aa472a247bd5aad3 Mon Sep 17 00:00:00 2001 From: Yanyun Liao Date: Tue, 21 Jul 2026 17:27:05 +0800 Subject: [PATCH 4/7] fix(onboard): prefer a running local vLLM over managed install in the Spark default (#7293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address PR Review Advisor PRA-1 (blocker): the managed-vLLM default only looked for the `install-vllm` entry. When vLLM is already running the menu can instead expose only `vllm`, so the branch would fall through to cloud `build`. Select the available local vLLM option in priority order — running `vllm` first, otherwise `install-vllm` — before the cloud fallback, via resolveManagedVllmDefaultKey(). Adds a resolver case for the sole-`vllm` running entry on a managed-vLLM platform. Signed-off-by: Yanyun Liao --- src/lib/onboard/provider-selection.test.ts | 10 +++++++++ src/lib/onboard/provider-selection.ts | 25 ++++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/lib/onboard/provider-selection.test.ts b/src/lib/onboard/provider-selection.test.ts index 32cf027db5a..4a6fa1a701a 100644 --- a/src/lib/onboard/provider-selection.test.ts +++ b/src/lib/onboard/provider-selection.test.ts @@ -142,6 +142,16 @@ describe("resolveRequestedProviderSelection", () => { assert.equal(selectedKey(result), "install-vllm"); }); + it("auto-selects an already-running local vLLM on a managed-vLLM platform (#7293)", () => { + // When vLLM is already running, the menu exposes only `vllm` (not install-vllm). + const result = resolve({ + options: [option("build"), option("vllm")], + preferManagedVllmDefault: true, + }); + + assert.equal(selectedKey(result), "vllm"); + }); + it("keeps the cloud default when the platform is not a managed-vLLM default (#7293)", () => { // Same options, but the host is not Spark/Station → must stay `build`. const result = resolve({ diff --git a/src/lib/onboard/provider-selection.ts b/src/lib/onboard/provider-selection.ts index 3b946aefc6f..388ae0ade26 100644 --- a/src/lib/onboard/provider-selection.ts +++ b/src/lib/onboard/provider-selection.ts @@ -72,6 +72,22 @@ function findOption(options: T[], key: string): T | un return options.find((option) => option.key === key); } +/** + * On a managed-vLLM-default platform (#7293), pick the available local vLLM menu + * option: `vllm` when a server is already running (the menu exposes only that + * entry), otherwise the managed install `install-vllm`. Returns null when the + * preference is off or neither entry is present, so the caller falls back to + * cloud `build`. + */ +function resolveManagedVllmDefaultKey( + input: ResolveRequestedProviderSelectionInput, +): string | null { + if (!input.preferManagedVllmDefault) return null; + if (findOption(input.options, "vllm")) return "vllm"; + if (findOption(input.options, "install-vllm")) return "install-vllm"; + return null; +} + function findWindowsHostKey(options: ProviderOption[]): string | null { return ( options.find((option) => option.key === "start-windows-ollama")?.key || @@ -125,12 +141,9 @@ export function resolveRequestedProviderSelection( recoveredFromSandbox = true; recoveredModel = input.readRecordedModel(input.sandboxName); } else { - // Prefer managed local vLLM on DGX Spark/Station when its menu entry is - // present; otherwise fall back to cloud NVIDIA Endpoints (#7293). - providerKey = - input.preferManagedVllmDefault && findOption(input.options, "install-vllm") - ? "install-vllm" - : "build"; + // Prefer managed local vLLM on DGX Spark/Station (running `vllm` or the + // managed `install-vllm`); fall back to cloud NVIDIA Endpoints (#7293). + providerKey = resolveManagedVllmDefaultKey(input) ?? "build"; } } From 6d50e34ab2947b679e18cdc8f75bb2a3896fac76 Mon Sep 17 00:00:00 2001 From: Yanyun Liao Date: Tue, 21 Jul 2026 18:05:54 +0800 Subject: [PATCH 5/7] test(onboard): cover the running-vLLM Spark default through the flow (#7293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address PR Review Advisor PRA-1 (warning): the running-vLLM priority had a resolver unit test, but the only running-vLLM flow case used an explicit getNonInteractiveProvider()=vllm. Add a createSetupNim regression: non-interactive Spark, no requested provider, vllmRunning true with only a `vllm` menu entry — asserts handleVllmSelection runs with managedInstall:false, installVllm is never called (no reinstall), and the cloud handler is never reached. Signed-off-by: Yanyun Liao --- src/lib/onboard/setup-nim-flow.test.ts | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/lib/onboard/setup-nim-flow.test.ts b/src/lib/onboard/setup-nim-flow.test.ts index 700907752d8..a91e48f3c0f 100644 --- a/src/lib/onboard/setup-nim-flow.test.ts +++ b/src/lib/onboard/setup-nim-flow.test.ts @@ -781,6 +781,52 @@ describe("createSetupNim", () => { expect(result).toMatchObject({ provider: "vllm" }); }); + it("reuses an already-running local vLLM on a DGX Spark non-interactive run with no requested provider (#7293)", async () => { + const profile = { name: "DGX Spark" } as VllmProfile; + // vLLM already running → the menu exposes only `vllm`; the no-provider + // default must reuse it (handleVllmSelection) and never reinstall + // (installVllm stays `unexpected`) or fall back to the cloud handler. + const detectInferenceProviderHostState = vi.fn(() => + makeHostState({ + vllmRunning: true, + vllmProfile: profile, + hasVllmImage: true, + vllmEntries: [{ key: "vllm", label: "Local vLLM (localhost:8000) — running (suggested)" }], + }), + ); + const routeGuard = vi.fn(() => ({ + requiredModel: null, + requiredEndpointUrl: null, + requiredInferenceApi: null, + })); + const handleVllmSelection = vi.fn(async (state) => { + state.provider = "vllm"; + state.model = "vllm-model"; + state.endpointUrl = "http://127.0.0.1:8000/v1"; + state.credentialEnv = null; + state.preferredInferenceApi = "openai-completions"; + return "selected"; + }); + const setupNim = createSetupNim( + makeDeps({ + isNonInteractive: () => true, + getNonInteractiveProvider: () => null, + detectInferenceProviderHostState, + handleVllmSelection, + }), + ); + + const sparkGpu = { platform: "spark" } as unknown as Parameters[0]; + const result = await setupNim(sparkGpu, null, null, true, null, "nemoclaw", routeGuard); + + expect(handleVllmSelection).toHaveBeenCalledOnce(); + expect(handleVllmSelection).toHaveBeenCalledWith( + expect.anything(), + expect.objectContaining({ managedInstall: false }), + ); + expect(result).toMatchObject({ provider: "vllm" }); + }); + it("threads the DGX Station express model through the standard managed-vLLM selection contract", async () => { const profile = { name: "DGX Station", platform: "station" } as VllmProfile; const servedModel = "nvidia/nemotron-3-ultra-550b-a55b"; From b77fadca78e0ad0fbeb43679bdbe927b918ed544 Mon Sep 17 00:00:00 2001 From: Charan Jagwani Date: Wed, 22 Jul 2026 09:20:13 -0700 Subject: [PATCH 6/7] fix(onboard): keep automatic vllm default Spark-scoped Signed-off-by: Charan Jagwani --- src/lib/onboard/provider-selection.ts | 11 ++++----- src/lib/onboard/setup-nim-flow.test.ts | 32 ++++++++++++++++++++++++++ src/lib/onboard/setup-nim-flow.ts | 3 +-- 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/lib/onboard/provider-selection.ts b/src/lib/onboard/provider-selection.ts index 388ae0ade26..13f2addc833 100644 --- a/src/lib/onboard/provider-selection.ts +++ b/src/lib/onboard/provider-selection.ts @@ -60,10 +60,9 @@ export interface ResolveRequestedProviderSelectionInput( recoveredFromSandbox = true; recoveredModel = input.readRecordedModel(input.sandboxName); } else { - // Prefer managed local vLLM on DGX Spark/Station (running `vllm` or the - // managed `install-vllm`); fall back to cloud NVIDIA Endpoints (#7293). + // Prefer managed local vLLM when the caller has approved that platform + // default; otherwise fall back to cloud NVIDIA Endpoints (#7293). providerKey = resolveManagedVllmDefaultKey(input) ?? "build"; } } diff --git a/src/lib/onboard/setup-nim-flow.test.ts b/src/lib/onboard/setup-nim-flow.test.ts index a91e48f3c0f..83160750def 100644 --- a/src/lib/onboard/setup-nim-flow.test.ts +++ b/src/lib/onboard/setup-nim-flow.test.ts @@ -827,6 +827,38 @@ describe("createSetupNim", () => { expect(result).toMatchObject({ provider: "vllm" }); }); + it("does not extend the Spark automatic default to DGX Station (#7293)", async () => { + const handleRemoteProviderSelection = vi.fn( + async ({ selected }, state) => { + expect(selected.key).toBe("build"); + state.model = "nvidia/nemotron-3-ultra-550b-a55b"; + state.provider = "nvidia-prod"; + state.endpointUrl = "https://integrate.api.nvidia.com/v1"; + state.credentialEnv = "NVIDIA_INFERENCE_API_KEY"; + state.preferredInferenceApi = "openai-completions"; + return "selected"; + }, + ); + const setupNim = createSetupNim( + makeDeps({ + isNonInteractive: () => true, + getNonInteractiveProvider: () => null, + detectInferenceProviderHostState: () => + makeHostState({ + vllmProfile: { name: "DGX Station" } as VllmProfile, + vllmEntries: [{ key: "install-vllm", label: "Start vLLM (DGX Station)" }], + }), + handleRemoteProviderSelection, + }), + ); + + const stationGpu = { platform: "station" } as unknown as Parameters[0]; + const result = await setupNim(stationGpu); + + expect(handleRemoteProviderSelection).toHaveBeenCalledOnce(); + expect(result).toMatchObject({ provider: "nvidia-prod" }); + }); + it("threads the DGX Station express model through the standard managed-vLLM selection contract", async () => { const profile = { name: "DGX Station", platform: "station" } as VllmProfile; const servedModel = "nvidia/nemotron-3-ultra-550b-a55b"; diff --git a/src/lib/onboard/setup-nim-flow.ts b/src/lib/onboard/setup-nim-flow.ts index 8b08a38de46..179d8249c68 100644 --- a/src/lib/onboard/setup-nim-flow.ts +++ b/src/lib/onboard/setup-nim-flow.ts @@ -27,7 +27,6 @@ import { promptForInferenceProviderSelection } from "./provider-selection-prompt import type { RebuildRouteHandoff, RegistryInferenceRoute } from "./rebuild-route-handoff"; import { prepareProviderDiscovery } from "./setup-nim-provider-discovery"; import type { SetupNimSelectionState as BaseSetupNimSelectionState } from "./setup-nim-selection"; -import { isManagedVllmDefaultPlatform } from "./vllm-menu"; export type SetupNimGpu = ReturnType; export type SetupNimSelectionState = BaseSetupNimSelectionState; @@ -404,7 +403,7 @@ export function createSetupNim( isWindowsHostOllama, windowsHostOllamaSupported: windowsHostOllamaDockerRequirement.supported, hermesProviderAvailable, - preferManagedVllmDefault: isManagedVllmDefaultPlatform(gpu?.platform), + preferManagedVllmDefault: gpu?.platform === "spark", ...recordedProviderReaders, }); if (providerSelection.kind === "failure") { From 9ab1cecd7425108e3a6f0c808bdfc45482d934f7 Mon Sep 17 00:00:00 2001 From: Senthil Ravichandran Date: Thu, 23 Jul 2026 10:52:13 -0700 Subject: [PATCH 7/7] docs(onboard): document Spark non-interactive vLLM default Signed-off-by: Senthil Ravichandran --- docs/get-started/quickstart.mdx | 4 +++- docs/inference/set-up-vllm.mdx | 6 ++++++ src/lib/onboard/provider-selection.test.ts | 4 ++-- src/lib/onboard/vllm-menu.ts | 6 +----- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/get-started/quickstart.mdx b/docs/get-started/quickstart.mdx index 0919765ae53..cc6d03f036c 100644 --- a/docs/get-started/quickstart.mdx +++ b/docs/get-started/quickstart.mdx @@ -97,7 +97,8 @@ Use these details when your first-run path needs more control. curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash -s -- --yes-i-accept-third-party-software ``` - For a non-interactive first run, also set the provider, credential, and sandbox name. + For a non-interactive first run, set the sandbox name. + Set the provider and matching credential unless you want DGX Spark to select local vLLM automatically. ```bash curl -fsSL https://www.nvidia.com/nemoclaw.sh | \ @@ -113,6 +114,7 @@ Use these details when your first-run path needs more control. The example uses NVIDIA Endpoints. Set `NEMOCLAW_AGENT` to `hermes` or `langchain-deepagents-code` to install another agent. Set `NEMOCLAW_PROVIDER` and the matching credential variable for another provider, then use a sandbox name that does not depend on a previous onboarding session. + On DGX Spark, omit `NEMOCLAW_PROVIDER` only when you want the automatic local selection described in [Set Up vLLM](../inference/local-inference/set-up-vllm#run-non-interactive-onboarding). To select a specific NemoClaw release, replace `vX.Y.Z` with its versioned release tag. `NEMOCLAW_INSTALL_REF` is a higher-priority development override, so clear it when pinning a release tag. diff --git a/docs/inference/set-up-vllm.mdx b/docs/inference/set-up-vllm.mdx index eb2ecb13ebb..e35f3092600 100644 --- a/docs/inference/set-up-vllm.mdx +++ b/docs/inference/set-up-vllm.mdx @@ -184,6 +184,12 @@ For the current support status and direct GPU policy boundaries, see [Platform S ## Run Non-Interactive Onboarding +On DGX Spark, non-interactive onboarding can select local vLLM when `NEMOCLAW_PROVIDER` is unset and no provider is recorded for the sandbox. +It reuses a running local vLLM server first. +If no server is running, it selects the managed install or start entry. +If neither local entry is available, it selects NVIDIA Endpoints. +On DGX Station and other hosts, an unset provider keeps NVIDIA Endpoints as the automatic default. + Use an already-running server. ```bash diff --git a/src/lib/onboard/provider-selection.test.ts b/src/lib/onboard/provider-selection.test.ts index 4a6fa1a701a..a7a1e4113f3 100644 --- a/src/lib/onboard/provider-selection.test.ts +++ b/src/lib/onboard/provider-selection.test.ts @@ -152,8 +152,8 @@ describe("resolveRequestedProviderSelection", () => { assert.equal(selectedKey(result), "vllm"); }); - it("keeps the cloud default when the platform is not a managed-vLLM default (#7293)", () => { - // Same options, but the host is not Spark/Station → must stay `build`. + it("keeps the cloud default when the caller does not prefer managed vLLM (#7293)", () => { + // The menu can expose managed vLLM without changing the automatic selection. const result = resolve({ options: [option("build"), option("install-vllm")], preferManagedVllmDefault: false, diff --git a/src/lib/onboard/vllm-menu.ts b/src/lib/onboard/vllm-menu.ts index fd89c75449c..91e8e89032a 100644 --- a/src/lib/onboard/vllm-menu.ts +++ b/src/lib/onboard/vllm-menu.ts @@ -32,11 +32,7 @@ interface VllmProfileShape { const MANAGED_VLLM_DEFAULT_PLATFORMS = new Set(["spark", "station"]); -/** - * DGX platforms where managed vLLM is the recommended default (not gated behind - * `experimental`). Single source of truth shared by the interactive menu and the - * non-interactive provider default (#7293), so both stay in lock-step. - */ +/** DGX platforms where the provider menu exposes managed vLLM without `experimental`. */ export function isManagedVllmDefaultPlatform(platform: NvidiaPlatform | null | undefined): boolean { return platform != null && MANAGED_VLLM_DEFAULT_PLATFORMS.has(platform); }