Skip to content

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

Closed

Description

@jfenal

Summary

LM Studio is polled every 30 seconds by default at http://127.0.0.1:1234 even when the user has never configured it. This generates continuous WARN provider discovery failed log noise and wastes CPU/network on connection attempts that will never succeed.

Root cause

cmd/tinycode/config.go:464 hardcodes a default LM Studio URL:

lmStudioURL := "http://127.0.0.1:1234"

This URL is passed to disc.Start() unconditionally. The only way to stop polling is to add "disabled_providers": ["lm-studio"] to config — an opt-out the user has to discover themselves.

Current workaround

Add to tinycode.jsonc:

{ "disabled_providers": ["lm-studio"] }

This now works (fixed in PR #22 — shouldPoll previously ignored the filter entirely), but requires the user to know about it.

Proposed fix

Change LM Studio (and vLLM) from opt-out to opt-in: only poll if the user has explicitly configured the URL via TINYCODE_LMSTUDIO_HOST env var or a provider.lm-studio config block. If neither is set, lmStudioURL should be "" and discovery skips it entirely.

// Before: always poll
lmStudioURL := "http://127.0.0.1:1234"

// After: only poll if explicitly configured
lmStudioURL := ""
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" // default only when configured
}

Ollama is different — it's the primary local provider and auto-discovery is a core feature; keep it opt-out.

Acceptance criteria

  • No LM Studio polling unless TINYCODE_LMSTUDIO_HOST is set or provider.lm-studio appears in config.
  • Same change applied to vLLM (TINYCODE_VLLM_HOST only, no default).
  • Existing disabled_providers filter continues to work as a secondary guard.
  • No log noise on a clean install with only Ollama running.

Activity

  1. bobbyjohnstx commented on Oct 12, 2026

    @bobbyjohnstx
    Owner

    Closing. LM Studio stays in the startup scan. A missing provider logs at info and then uses dormant backoff. A healthy provider is probed every 15 minutes. Opt-in-only polling was declined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions