feat: add LM Studio provider (closes #57) - #89
Open
neerajdad123-byte wants to merge 5 commits into
Open
Conversation
added 5 commits
July 6, 2026 12:05
Adds lmStudio to ProviderName union type, MercuryConfig providers interface, default config with baseUrl http://127.0.0.1:1234/v1, and isProviderConfigured (no API key required — checks baseUrl + model like ollamaLocal).
LM Studio exposes an OpenAI-compatible API at localhost:1234/v1. Route it through the existing OpenAICompatProvider with useChatApi: true, same as ollamaCloud and ollamaLocal.
Adds LM_STUDIO_PREFERRED_MODELS empty list (LM Studio models vary by user install), fetchLmStudioModels function targeting /v1/models endpoint, routing in fetchProviderModelCatalog, and 2 tests for lmStudio model catalog.
Adds lmStudio to PROVIDER_OPTIONS list, validates no API key needed (returns null), adds promptLmStudioModelSelection function (cloned from ollamaLocal pattern), and wires it into the setup wizard flow.
Adds LM_STUDIO_BASE_URL (default http://127.0.0.1:1234/v1), LM_STUDIO_MODEL, and LM_STUDIO_ENABLED env vars.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds LM Studio as a local LLM provider. LM Studio runs models locally on desktop and exposes an OpenAI-compatible API
at http://127.0.0.1:1234/v1. No API key required — just install LM Studio, load a model, and Mercury can use it.
What's included
(models vary per user install)
instance, with manual model name fallback
How to test
Verification