Skip to content

fix(provider): do not poll LM Studio unless explicitly configured - #39

Open
jfenal wants to merge 1 commit into
bobbyjohnstx:mainfrom
jfenal:fix/lmstudio-opt-in
Open

jfenal wants to merge 1 commit into
bobbyjohnstx:mainfrom
jfenal:fix/lmstudio-opt-in

Conversation

@jfenal

@jfenal jfenal commented Oct 9, 2026

Copy link
Copy Markdown

Problem

LM Studio was hard-coded to http://127.0.0.1:1234 in startDiscovery and polled every 30 seconds on every install — even on machines where it is not installed or configured. This produced continuous WARN log noise (connection refused on 127.0.0.1:1234) and a constant background network probe.

Fix

cmd/tinycode/config.go: only pass the LM Studio URL to discovery when the user has explicitly opted in, which happens when:

  • TINYCODE_LMSTUDIO_HOST is set (existing behavior, unchanged), or
  • an lm-studio provider block is present in the config file (new — restores the URL to the standard default http://127.0.0.1:1234).

Otherwise the URL stays empty and Discovery.poll skips the provider entirely (same mechanism vLLM already uses). Ollama is unchanged.

Verification

  • go build ./cmd/tinycode — passes
  • go vet ./cmd/tinycode/ — passes
  • go test ./cmd/tinycode/ + go test ./internal/provider/ — pass

Fixes #28

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 bobbyjohnstx#28
@jfenal
jfenal requested a review from bobbyjohnstx as a code owner October 9, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(provider): LM Studio should not be polled by default if unconfigured

1 participant