Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Setup guide - From LM Studio and GitHub Copilot docs

Use LM Studio in GitHub Copilot

VS Code chat (GitHub Copilot) supports bring-your-own-key models through the Custom Endpoint provider, which speaks Chat Completions, Responses or Messages. LM Studio documents OpenAI-compatible /v1/chat/completions and /v1/responses plus Anthropic-compatible /v1/messages at http://localhost:1234, so you combine the two.

Last verified 6 steps5 official sources

Steps

  1. Step 1.

    Start LM Studio's local server (LM Studio docs).

    Terminal
    lms server start --port 1234
  2. Step 2.

    In VS Code, open the Language Models editor: select Manage Language Models (gear icon) from the language model picker, or run Chat: Manage Language Models from the Command Palette.

  3. Step 3.

    Select Add Models, then select Custom Endpoint from the list. Enter a group name, then a display name and API key for the endpoint.

  4. Step 4.

    Select the API type: Chat Completions, Responses, or Messages. Make sure the model supports this API type. VS Code opens a chatLanguageModels.json file where you configure the model details.

  5. Step 5.

    Example model entry, combining VS Code's documented Custom Endpoint schema with LM Studio's documented chat completions URL and model id (illustrative, not copied from either page as a whole).

    JSON
    [
      {
        "name": "LM Studio",
        "vendor": "customendpoint",
        "apiKey": "${input:lmstudioApiKey}",
        "apiType": "chat-completions",
        "models": [
          {
            "id": "openai/gpt-oss-20b",
            "name": "gpt-oss-20b (LM Studio)",
            "url": "http://localhost:1234/v1/chat/completions",
            "toolCalling": true,
            "vision": false,
            "maxInputTokens": 28000,
            "maxOutputTokens": 4000
          }
        ]
      }
    ]
  6. Step 6.

    Optional: list the model identifiers LM Studio is serving (LM Studio docs).

    Terminal
    curl http://localhost:1234/v1/models

Caveats

  • Combined path: neither GitHub nor LM Studio publishes an LM Studio-in-Copilot guide. VS Code documents the Custom Endpoint mechanism and LM Studio documents the endpoints and model ids. The JSON in step 5 is assembled from both and is not verbatim. The maxInputTokens/maxOutputTokens values are placeholders and must fit the context length you set in LM Studio.
  • VS Code docs: 'BYOK applies to the chat experience and utility tasks only.' Inline code completions still use Copilot's own models.
  • The VS Code flow asks for an API key. LM Studio needs none unless Require Authentication is on, so any placeholder value should do. This was not verified.
  • For a Responses API type against LM Studio, VS Code documents statefulResponses (default true). LM Studio's Responses endpoint advertises prior response state support, but this pairing was not tested.
  • The Custom Endpoint provider replaces the deprecated OpenAI Compatible provider, and the github.copilot.chat.customOAIModels setting is deprecated.

FAQ

How do I use LM Studio in GitHub Copilot?

VS Code chat (GitHub Copilot) supports bring-your-own-key models through the Custom Endpoint provider, which speaks Chat Completions, Responses or Messages. LM Studio documents OpenAI-compatible /v1/chat/completions and /v1/responses plus Anthropic-compatible /v1/messages at http://localhost:1234, so you combine the two.

Which LM Studio model ids work in GitHub Copilot?

The official docs read for this guide list openai/gpt-oss-20b and ibm/granite-4-micro. Requests go to http://localhost:1234/v1.

Is this an official LM Studio and GitHub Copilot setup?

The steps draw on both LM Studio's and GitHub Copilot's docs. It was last checked against 5 official pages on October 17, 2026.

Sources

Last verified against 5 official pages.

Newsletter

New models, set up the day they ship

One email per week. New model releases, the coding tools that support them and how to wire them up.