Skip to content

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

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

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
@bobbyjohnstx

Copy link
Copy Markdown
Owner

Closing without merging. The continuous WARN and 30-second probe of an unused LM Studio (127.0.0.1:1234, #28) is handled on main by a different change:

This PR's opt-in (skip LM Studio unless TINYCODE_LMSTUDIO_HOST or an lm-studio config block is set) is not what we want: startup should still try LM Studio along with Ollama, vLLM, and OpenRouter.

bobbyjohnstx added a commit that referenced this pull request Oct 12, 2026
GitHub #39 / #28 asked to stop probing an unconfigured LM Studio. Healthy providers now wait 15 minutes, and a missing daemon logs at info and then backs off, while LM Studio stays in the startup scan.

Co-authored-by: Cursor <cursoragent@cursor.com>
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

2 participants