LM Studio Provider
Configure @namzu/lmstudio for local LM Studio server usage in Namzu.
@namzu/lmstudio integrates Namzu with LM Studio through the official LM Studio SDK. It is aimed at local-model workflows where LM Studio is the operator-facing environment.
1. When to Use It
Choose this package when LM Studio is already the way you manage and serve local models, and you want a provider that matches that environment directly.
2. When Not to Use It
Choose another provider when:
- you want generic HTTP compatibility over LM Studio's native SDK behavior
- you are running local models through Ollama instead of LM Studio
3. Install
4. Prerequisites
Before creating the provider:
- start the LM Studio local server
- load the model you plan to use
- confirm the server host if you are not using the default
5. Register and Create the Provider
6. Sanity-Check With a Direct Provider Call
7. Configuration
| Field | Required | Description |
|---|---|---|
host | No | LM Studio server URL |
model | No | Default loaded model identifier |
timeout | No | Request timeout in milliseconds |
8. Capability Snapshot
The package exports LMSTUDIO_CAPABILITIES:
Practical behavior still depends on the loaded model.
9. Operational Notes
- The target model must already be loaded in LM Studio.
- This package uses the official LM Studio SDK rather than the OpenAI-compatible HTTP endpoint.
- If you want a more generic HTTP-only integration,
@namzu/httpcan target LM Studio's compatible endpoint instead. hostacceptshttp://orhttps://, but the SDK converts it to the WebSocket form it needs internally.- The provider also implements
listModels()andhealthCheck().
10. Common Errors
| Error | Meaning | Fix |
|---|---|---|
Unsupported provider type: lmstudio | registration never happened | call registerLMStudio() first |
| model required error | neither provider config nor call supplied a model | set a default model or pass one per call |
| model not found or unloaded | LM Studio server is up but the model is not loaded | load the model first in LM Studio |