@kody-ade/kody-engine-lite 0.1.30 → 0.1.31
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/bin/cli.js +10 -5
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -2407,21 +2407,26 @@ async function tryStartLitellm(url, projectDir) {
|
|
|
2407
2407
|
}
|
|
2408
2408
|
const portMatch = url.match(/:(\d+)/);
|
|
2409
2409
|
const port = portMatch ? portMatch[1] : "4000";
|
|
2410
|
+
let litellmFound = false;
|
|
2410
2411
|
try {
|
|
2411
|
-
execFileSync9("
|
|
2412
|
+
execFileSync9("which", ["litellm"], { timeout: 3e3, stdio: "pipe" });
|
|
2413
|
+
litellmFound = true;
|
|
2412
2414
|
} catch {
|
|
2413
2415
|
try {
|
|
2414
|
-
execFileSync9("python3", ["-
|
|
2416
|
+
execFileSync9("python3", ["-c", "import litellm"], { timeout: 1e4, stdio: "pipe" });
|
|
2417
|
+
litellmFound = true;
|
|
2415
2418
|
} catch {
|
|
2416
|
-
logger.warn("litellm not installed (pip install 'litellm[proxy]')");
|
|
2417
|
-
return null;
|
|
2418
2419
|
}
|
|
2419
2420
|
}
|
|
2421
|
+
if (!litellmFound) {
|
|
2422
|
+
logger.warn("litellm not installed (pip install 'litellm[proxy]')");
|
|
2423
|
+
return null;
|
|
2424
|
+
}
|
|
2420
2425
|
logger.info(`Starting LiteLLM proxy on port ${port}...`);
|
|
2421
2426
|
let cmd;
|
|
2422
2427
|
let args2;
|
|
2423
2428
|
try {
|
|
2424
|
-
execFileSync9("
|
|
2429
|
+
execFileSync9("which", ["litellm"], { timeout: 3e3, stdio: "pipe" });
|
|
2425
2430
|
cmd = "litellm";
|
|
2426
2431
|
args2 = ["--config", configPath, "--port", port];
|
|
2427
2432
|
} catch {
|