Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions bin/lib/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const registry = require("./registry");
const nim = require("./nim");
const policies = require("./policies");
const HOST_GATEWAY_URL = "http://host.openshell.internal";
const EXPERIMENTAL = process.env.NEMOCLAW_EXPERIMENTAL === "1";

// ── Helpers ──────────────────────────────────────────────────────

Expand Down Expand Up @@ -201,38 +202,40 @@ async function setupNim(sandboxName, gpu) {
const ollamaRunning = !!runCapture("curl -sf http://localhost:11434/api/tags 2>/dev/null", { ignoreError: true });
const vllmRunning = !!runCapture("curl -sf http://localhost:8000/v1/models 2>/dev/null", { ignoreError: true });

// Auto-select if a local inference engine is already running
if (vllmRunning) {
console.log(" ✓ vLLM detected on localhost:8000 — using it");
provider = "vllm-local";
model = "vllm-local";
registry.updateSandbox(sandboxName, { model, provider, nimContainer });
return { model, provider };
}
if (ollamaRunning) {
console.log(" ✓ Ollama detected on localhost:11434 — using it");
provider = "ollama-local";
model = "nemotron-3-nano";
registry.updateSandbox(sandboxName, { model, provider, nimContainer });
return { model, provider };
// Auto-select only with NEMOCLAW_EXPERIMENTAL=1 (prevents silent misconfiguration)
if (EXPERIMENTAL) {
if (vllmRunning) {
console.log(" ✓ vLLM detected on localhost:8000 — using it [experimental]");
provider = "vllm-local";
model = "vllm-local";
registry.updateSandbox(sandboxName, { model, provider, nimContainer });
return { model, provider };
}
if (ollamaRunning) {
console.log(" ✓ Ollama detected on localhost:11434 — using it [experimental]");
provider = "ollama-local";
model = "nemotron-3-nano";
registry.updateSandbox(sandboxName, { model, provider, nimContainer });
return { model, provider };
}
}

// Build options list dynamically
// Build options list — always show local options but label as experimental
const options = [];
if (gpu && gpu.nimCapable) {
options.push({ key: "nim", label: "Local NIM container (NVIDIA GPU)" });
options.push({ key: "nim", label: "Local NIM container (NVIDIA GPU) [experimental]" });
}
options.push({ key: "cloud", label: "NVIDIA Cloud API (build.nvidia.com)" });
if (hasOllama || ollamaRunning) {
options.push({ key: "ollama", label: `Local Ollama (localhost:11434)${ollamaRunning ? " — running" : ""}` });
options.push({ key: "ollama", label: `Local Ollama (localhost:11434)${ollamaRunning ? " — running" : ""} [experimental]` });
}
if (vllmRunning) {
options.push({ key: "vllm", label: "Existing vLLM instance (localhost:8000) — running" });
options.push({ key: "vllm", label: "Existing vLLM instance (localhost:8000) — running [experimental]" });
}

// On macOS without Ollama, offer to install it
if (!hasOllama && process.platform === "darwin") {
options.push({ key: "install-ollama", label: "Install Ollama (recommended for macOS)" });
options.push({ key: "install-ollama", label: "Install Ollama (macOS) [experimental]" });
}

if (options.length > 1) {
Expand Down
2 changes: 1 addition & 1 deletion nemoclaw/dist/cli.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nemoclaw/dist/cli.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nemoclaw/dist/commands/onboard.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 40 additions & 29 deletions nemoclaw/dist/commands/onboard.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading