turbollm 1.9.4 → 1.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +12 -11
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1460,11 +1460,11 @@ var Manager = class _Manager {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
/** Wait until the engine leaves the 'starting' state (→ running or error/stopped),
|
|
1463
|
-
* bounded by the
|
|
1464
|
-
*
|
|
1465
|
-
*
|
|
1463
|
+
* bounded by the readiness window plus a small grace. The internal readiness loop
|
|
1464
|
+
* flips the state and surfaces errors; this just keeps the load gate held until
|
|
1465
|
+
* that resolves. */
|
|
1466
1466
|
async awaitNotStarting() {
|
|
1467
|
-
const deadline = Date.now() +
|
|
1467
|
+
const deadline = Date.now() + READINESS_TIMEOUT_MS + 5e3;
|
|
1468
1468
|
while (this.state === "starting" && Date.now() < deadline) await sleep(200);
|
|
1469
1469
|
}
|
|
1470
1470
|
async startInternal(opts) {
|
|
@@ -1694,10 +1694,13 @@ var Manager = class _Manager {
|
|
|
1694
1694
|
if (this.child !== child) return;
|
|
1695
1695
|
if (child.pid) clearEnginePid(this.store.dir(), child.pid);
|
|
1696
1696
|
const cleanStop = this.state === "stopping" || this.state === "stopped";
|
|
1697
|
+
const timedOut = this.state === "error" && this.errInfo?.code === "readiness_timeout";
|
|
1697
1698
|
try {
|
|
1698
1699
|
logStream.write(
|
|
1699
1700
|
cleanStop ? `
|
|
1700
1701
|
[turbollm] engine stopped \u2014 the model is no longer loaded.
|
|
1702
|
+
` : timedOut ? `
|
|
1703
|
+
[turbollm] engine process killed after the readiness timeout above. The model did NOT load.
|
|
1701
1704
|
` : `
|
|
1702
1705
|
[turbollm] engine process exited unexpectedly (exit ${code})${errMsg ? ` \u2014 ${errMsg}` : ""}. The model did NOT load / is no longer loaded.
|
|
1703
1706
|
`
|
|
@@ -1705,9 +1708,9 @@ var Manager = class _Manager {
|
|
|
1705
1708
|
} catch {
|
|
1706
1709
|
}
|
|
1707
1710
|
logStream.end();
|
|
1708
|
-
if (
|
|
1711
|
+
if (cleanStop) {
|
|
1709
1712
|
this.state = "stopped";
|
|
1710
|
-
} else {
|
|
1713
|
+
} else if (!timedOut) {
|
|
1711
1714
|
this.state = "error";
|
|
1712
1715
|
this.errInfo = {
|
|
1713
1716
|
code: errMsg ? "engine_spawn_failed" : "engine_exited",
|
|
@@ -1723,7 +1726,7 @@ var Manager = class _Manager {
|
|
|
1723
1726
|
}
|
|
1724
1727
|
async readiness(child, port2) {
|
|
1725
1728
|
const kind = this.opts?.engine.kind ?? "llama-server";
|
|
1726
|
-
const deadline = Date.now() +
|
|
1729
|
+
const deadline = Date.now() + READINESS_TIMEOUT_MS;
|
|
1727
1730
|
for (; ; ) {
|
|
1728
1731
|
await sleep(500);
|
|
1729
1732
|
if (this.child !== child || this.state !== "starting") return;
|
|
@@ -1750,7 +1753,7 @@ var Manager = class _Manager {
|
|
|
1750
1753
|
this.state = "error";
|
|
1751
1754
|
this.errInfo = {
|
|
1752
1755
|
code: "readiness_timeout",
|
|
1753
|
-
message: `The model did not become ready within ${Math.round(
|
|
1756
|
+
message: `The model did not become ready within ${Math.round(READINESS_TIMEOUT_MS / 1e3)} seconds.`,
|
|
1754
1757
|
exitCode: -1,
|
|
1755
1758
|
logTail: readTail(this.logPathStr, 20)
|
|
1756
1759
|
};
|
|
@@ -1794,9 +1797,7 @@ function engineCommand(opts, port2, slotSavePath) {
|
|
|
1794
1797
|
}
|
|
1795
1798
|
return { cmd: opts.engine.binPath, args: buildArgs(opts, port2, slotSavePath) };
|
|
1796
1799
|
}
|
|
1797
|
-
|
|
1798
|
-
return kind === "vllm" || kind === "sglang" ? 6e5 : 12e4;
|
|
1799
|
-
}
|
|
1800
|
+
var READINESS_TIMEOUT_MS = 6e5;
|
|
1800
1801
|
function pyEngineEnv(kind, dataDir, binPath) {
|
|
1801
1802
|
if (kind !== "mlx" && kind !== "rapid-mlx" && kind !== "vllm" && kind !== "sglang") {
|
|
1802
1803
|
if (process.platform === "win32") return void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "turbollm",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
4
|
"description": "TurboLLM — local LLM platform: run any inference engine auto-tuned to your GPU, with a web UI and OpenAI/Anthropic-compatible API. Point Claude Code at your own machine in one command.",
|
|
5
5
|
"license": "FSL-1.1-ALv2",
|
|
6
6
|
"author": "Mohit Soni",
|