# LM Studio

> Use a model served by LM Studio with ShopAssist; only models with a tool chat template work.

Source: https://shopassist.coec.dk/docs/ai/lm-studio · Updated 2026-10-01

## Run the server [#run]

In LM Studio, open **Developer → Start server**, load a model whose chat template supports tools (LM Studio marks them with a tool icon), and set the context length to at least 16,384 tokens.

Expose the server on a public HTTPS URL behind a reverse proxy with authentication. LM Studio's local server isn't reachable from ShopAssist directly.

## Settings [#settings]

* Preset: **LM Studio**, base URL `https://llm.example.com/v1`.
* API key: the key your proxy expects.
* Model: the model identifier shown in LM Studio.

## Data location [#data-location]

> **Data location:** Data goes wherever this endpoint runs. Self-hosted endpoints must be reachable over HTTPS with authentication.

## Troubleshooting [#troubleshooting]

* **`tools_unsupported`:** the model has no tool chat template.
* **`context_too_small`:** raise the context length in the model's load settings.
