diff --git a/test-backoff.ts b/test-backoff.ts index 887a812..ea26da1 100644 --- a/test-backoff.ts +++ b/test-backoff.ts @@ -141,3 +141,13 @@ test("nothing anywhere falls back to localhost", () => { "http://localhost:8080", ]) }) + +test("provider base_url fallback is detected", () => { + const snake = [{ id: "llamacpp", name: "llama.cpp", options: { base_url: "http://localhost:9090/v1" } }] + assert.deepEqual(resolveServerUrls(undefined, snake, {}), ["http://localhost:9090"]) +}) + +test("ollama in id excludes even when name mentions llama", () => { + const mixed = [{ id: "ollama-bridge", name: "My llama server", options: { baseURL: "http://localhost:11434" } }] + assert.deepEqual(resolveServerUrls(undefined, mixed, {}), ["http://localhost:8080"]) +})