How to connect to LM Studio from Continue.dev
Continue.dev installed, LM Studio running with API server
What this does
Configures the Continue.dev AI coding assistant to route chat completions and code suggestions through the local LM Studio REST API. After completion, all inference runs on-premises with no cloud dependency.
Steps
Start the LM Studio API server. Open LM Studio, navigate to the Server tab, select a downloaded model, and click Start Server. Confirm the green status indicator is active.
Open the Continue.dev configuration file. In VS Code, click the Continue.dev sidebar icon to reveal the config panel. Locate the config.json link.
Add an LM Studio provider block to the config. Insert a new entry in the
modelslist specifying the local server as the base URL.{ "title": "Local LM Studio", "provider": "openai", "model": "lmstudio-community/Mistral-7B-Instruct-v0.3", "api_base": "http://localhost:1234/v1" }Save the file. Continue.dev reloads the configuration automatically.
Select the local model in the Continue.dev chat panel. Activate the Continue.dev sidebar and use the model selector dropdown to choose Local LM Studio. Type a test prompt. The response is generated by the model running in LM Studio.
Verification
curl -X POST http://localhost:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "lmstudio-community/Mistral-7B-Instruct-v0.3", "messages": [{"role": "user", "content": "Ping"}], "max_tokens": 5}'
# Expected: JSON response with a choices array containing model-generated text
Common failures
- Continue.dev shows "Could not connect" — The LM Studio server is not running. Confirm the green status indicator in the Server tab.
- Wrong model identifier — The model name in the config must exactly match the identifier in the LM Studio server dropdown.
- API base URL misconfigured — The base URL must include the
/v1suffix, for examplehttp://localhost:1234/v1with no trailing slash. - Firewall blocks localhost connections — Verify with a direct
curltest from a terminal first.