From 6ed1c8e79d06c0a801ef2e44f89fb3d415c9bd21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Fenal?= Date: Fri, 9 Oct 2026 23:34:15 +0200 Subject: [PATCH] fix(provider): do not poll LM Studio unless explicitly configured LM Studio was hard-coded to http://127.0.0.1:1234 and polled every 30s on every install, producing continuous WARN log noise on machines where it is not used. Discovery now only probes LM Studio when the TINYCODE_LMSTUDIO_HOST env var is set or an lm-studio provider block is present in config. vLLM already required TINYCODE_VLLM_HOST and is unchanged. Fixes #28 --- cmd/tinycode/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/tinycode/config.go b/cmd/tinycode/config.go index ccb91465b..aba3b3527 100644 --- a/cmd/tinycode/config.go +++ b/cmd/tinycode/config.go @@ -461,7 +461,7 @@ func startDiscovery(ctx context.Context, reg *provider.Registry, b *bus.Bus, cfg disc := provider.NewDiscovery(reg, b) ollamaURL := "http://127.0.0.1:11434" - lmStudioURL := "http://127.0.0.1:1234" + lmStudioURL := "" vllmURL := "" if v := os.Getenv("TINYCODE_OLLAMA_HOST"); v != "" { @@ -471,6 +471,8 @@ func startDiscovery(ctx context.Context, reg *provider.Registry, b *bus.Bus, cfg } if v := os.Getenv("TINYCODE_LMSTUDIO_HOST"); v != "" { lmStudioURL = v + } else if _, ok := cfg.Provider["lm-studio"]; ok { + lmStudioURL = "http://127.0.0.1:1234" } if v := os.Getenv("TINYCODE_VLLM_HOST"); v != "" { vllmURL = v