fix: always load provider URLs from config, fallback to localhost

This commit is contained in:
Troed Sångberg
2026-06-16 13:15:05 +02:00
parent 578c15b923
commit ed58639d40
+4 -4
View File
@@ -280,7 +280,7 @@ const tui: TuiPlugin = async (api) => {
bump()
}
let llamaServerUrls: string[] = ["http://localhost:8080"]
let llamaServerUrls: string[] = []
let llamaServerModel: string | undefined
const pollMetrics = async () => {
@@ -508,11 +508,11 @@ const tui: TuiPlugin = async (api) => {
})
try {
if (!llamaServerUrls.length) {
llamaServerUrls = await loadConfigUrls(api)
}
const configUrls = await loadConfigUrls(api)
llamaServerUrls = configUrls.length > 0 ? configUrls : ["http://localhost:8080"]
} catch (e) {
console.error("[oc-ls-stats] loadConfigUrls error:", e)
llamaServerUrls = ["http://localhost:8080"]
}
api.slots.register({