From 578c15b923063b92a5a5bce28de4e5a601851efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Troed=20S=C3=A5ngberg?= Date: Tue, 16 Jun 2026 12:55:36 +0200 Subject: [PATCH] filter providers by 'llama' name, exclude ollama --- package.json | 2 +- tui.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4d866ab..a5d128d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@troed/oc-ls-stats", - "version": "1.0.10", + "version": "1.0.11", "type": "module", "exports": { "./tui": { diff --git a/tui.tsx b/tui.tsx index 78f1f05..75d6a77 100644 --- a/tui.tsx +++ b/tui.tsx @@ -129,12 +129,12 @@ function extractProviderUrls(config: unknown): string[] { if (!provider || typeof provider !== "object") return [] const urls: string[] = [] - for (const [_key, val] of Object.entries(provider as Record)) { + for (const [key, val] of Object.entries(provider as Record)) { if (val && typeof val === "object") { const opts = (val as Record).options if (opts && typeof opts === "object") { const baseURL = (opts as Record).baseURL || (opts as Record).base_url - if (typeof baseURL === "string" && baseURL.includes("localhost")) { + if (typeof baseURL === "string" && key.toLowerCase().includes("llama") && !key.toLowerCase().includes("ollama")) { urls.push(stripBaseUrlPath(baseURL)) } }