Skip to content

Commit 3c80bf1

Browse files
committed
fix(benchmark): resolve double /v1 path in VLM URL construction
When --vlm URL included /v1 suffix (e.g. http://localhost:5405/v1), llmCall constructed http://host:5405/v1/v1/chat/completions causing HTTP 404. Now strips trailing /v1 before appending endpoint path. Result: 35/35 VLM tests now pass (LFM2.5-VL-1.6B-Q8_0).
1 parent 535ba50 commit 3c80bf1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

skills/analysis/home-security-benchmark/scripts/run-benchmark.cjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ async function llmCall(messages, opts = {}) {
104104
if (opts.temperature !== undefined) body.temperature = opts.temperature;
105105
if (opts.tools) body.tools = opts.tools;
106106

107-
const url = opts.vlm ? `${VLM_URL}/v1/chat/completions` : `${GATEWAY_URL}/v1/chat/completions`;
107+
// Strip trailing /v1 from VLM_URL to avoid double-path (e.g. host:5405/v1/v1/...)
108+
const vlmBase = VLM_URL ? VLM_URL.replace(/\/v1\/?$/, '') : '';
109+
const url = opts.vlm ? `${vlmBase}/v1/chat/completions` : `${GATEWAY_URL}/v1/chat/completions`;
108110
const response = await fetch(url, {
109111
method: 'POST',
110112
headers: { 'Content-Type': 'application/json' },

0 commit comments

Comments
 (0)