Skip to content
Merged
11 changes: 11 additions & 0 deletions bin/lib/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ function probeOpenAiLikeEndpoint(endpointUrl, model, apiKey) {
const result = spawnSync("bash", ["-c", cmd], {
cwd: ROOT,
encoding: "utf8",
timeout: 30_000,
env: {
...process.env,
NEMOCLAW_PROBE_API_KEY: apiKey,
Expand Down Expand Up @@ -729,6 +730,7 @@ function probeAnthropicEndpoint(endpointUrl, model, apiKey) {
const result = spawnSync("bash", ["-c", cmd], {
cwd: ROOT,
encoding: "utf8",
timeout: 30_000,
env: {
...process.env,
NEMOCLAW_PROBE_API_KEY: apiKey,
Expand Down Expand Up @@ -869,6 +871,7 @@ function fetchNvidiaEndpointModels(apiKey) {
const result = spawnSync("bash", ["-c", cmd], {
cwd: ROOT,
encoding: "utf8",
timeout: 30_000,
env: {
...process.env,
NEMOCLAW_PROBE_API_KEY: apiKey,
Expand Down Expand Up @@ -922,6 +925,7 @@ function fetchOpenAiLikeModels(endpointUrl, apiKey) {
const result = spawnSync("bash", ["-c", cmd], {
cwd: ROOT,
encoding: "utf8",
timeout: 30_000,
env: {
...process.env,
NEMOCLAW_PROBE_API_KEY: apiKey,
Expand Down Expand Up @@ -959,6 +963,7 @@ function fetchAnthropicModels(endpointUrl, apiKey) {
const result = spawnSync("bash", ["-c", cmd], {
cwd: ROOT,
encoding: "utf8",
timeout: 30_000,
env: {
...process.env,
NEMOCLAW_PROBE_API_KEY: apiKey,
Expand Down Expand Up @@ -1225,8 +1230,13 @@ function pullOllamaModel(model) {
cwd: ROOT,
encoding: "utf8",
stdio: "inherit",
timeout: 600_000,
env: { ...process.env },
});
if (result.signal === "SIGTERM") {
console.error(` Model pull timed out after 10 minutes. Try a smaller model or check your network connection.`);
return false;
}
return result.status === 0;
}

Expand Down Expand Up @@ -1360,6 +1370,7 @@ function installOpenshell() {
env: process.env,
stdio: ["ignore", "pipe", "pipe"],
encoding: "utf-8",
timeout: 300_000,
});
if (result.status !== 0) {
const output = `${result.stdout || ""}${result.stderr || ""}`.trim();
Expand Down
Loading