Skip to content

Commit 0b63c51

Browse files
committed
Fix 2 failing CI tests
- describeSpawnFailure("vllm"): the test expects an actionable install command in the message (matching the existing installCommand() helper already used by explainStartupFailure); reused it for all three backends instead of hand-written prose that had drifted out of sync with the test. - recommendModels VRAM test: aggregateUsableVramGB is intentionally rounded to 1 decimal place (same precision as every other GB figure this function reports), so 21.12 * 2 GPUs displays as 42.2, not the unrounded 42.24 the test asserted.
1 parent 7b349f8 commit 0b63c51

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

app/src/local-server-manager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ export function installCommand(backend: LocalBackendId): string {
6060
}
6161

6262
export function describeSpawnFailure(backend: LocalBackendId): string {
63-
if (backend === "mlx") return "Couldn't launch MLX. Install mlx-lm on an Apple Silicon Mac and verify the configured Python interpreter.";
64-
if (backend === "vllm") return "Couldn't launch vLLM. Install vLLM in Linux/WSL and verify that its CUDA or ROCm requirements match the GPU driver.";
65-
return "Couldn't launch ROCm llama-server. Configure a working ROCm/HIP llama-server executable and verify ROCm device access.";
63+
if (backend === "mlx") return `Couldn't launch MLX. Install mlx-lm on an Apple Silicon Mac (${installCommand("mlx")}) and verify the configured Python interpreter.`;
64+
if (backend === "vllm") return `Couldn't launch vLLM. Install it in Linux/WSL (${installCommand("vllm")}) and verify that its CUDA or ROCm requirements match the GPU driver.`;
65+
return `Couldn't launch ROCm llama-server. ${installCommand("rocm")} and verify ROCm device access.`;
6666
}
6767

6868
async function commandSucceeds(command: string, args: string[]): Promise<boolean> {

app/src/system-specs.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ describe("recommendModels", () => {
6767
});
6868
const result = recommendModels(specs);
6969
// 48GB aggregate remains visible, but is not treated as one pool.
70-
expect(result.usableVRAMGB).toBeCloseTo(42.24);
70+
// aggregateUsableVramGB is rounded to 1 decimal place (same precision
71+
// as every other GB figure this function reports), so the raw
72+
// 21.12 * 2 = 42.24 product displays as 42.2, not 42.24.
73+
expect(result.usableVRAMGB).toBeCloseTo(42.2, 1);
7174
});
7275

7376
it("does not treat aggregate VRAM as one GPU", () => {

0 commit comments

Comments
 (0)