filter providers by 'llama' name, exclude ollama

This commit is contained in:
Troed Sångberg
2026-06-16 12:55:36 +02:00
parent f473ab98e2
commit 578c15b923
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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": {
+2 -2
View File
@@ -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<string, unknown>)) {
for (const [key, val] of Object.entries(provider as Record<string, unknown>)) {
if (val && typeof val === "object") {
const opts = (val as Record<string, unknown>).options
if (opts && typeof opts === "object") {
const baseURL = (opts as Record<string, unknown>).baseURL || (opts as Record<string, unknown>).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))
}
}