Skip to content

VS Code Configuration ​

VS Code + GitHub Copilot ​

VS Code + GitHub Copilot supports connecting to external models, but mainly works with Copilot Chat.

<span style="color: inherit; background-color: rgb(247,105,100)">Note:</span> Copilot does not currently support Anthropic (Claude) related models. If you want to use Claude models, please refer to the next section.

Prerequisites ​

Before starting, please confirm the following conditions:

  • Latest version of VS Code Insiders 1.104 installed (https://code.visualstudio.com/insiders/)

  • GitHub Copilot extension installed and logged in

  • GitHub account has Copilot permissions, at least Copilot Free or higher

  • If connecting to third-party/external models, the following should be prepared:

    • API Key

    • Endpoint URL

    • Model ID

Adding External Models via Copilot Chat GUI ​

This is currently the most direct method and is recommended first.

Steps ​

  1. Open VS Code.

  2. Click Copilot Chat in the title bar or sidebar.

  3. Find the current model dropdown at the bottom of the chat input box.

  4. Click the current model name.

  5. Select Other Models, then select Manage Models.

  6. In the pop-up Language Models editor, click Add Models.

  7. Select a model provider from the list, for example:

    • OpenAI

    • Anthropic

    • Google

    • Other built-in providers

    • Extension-provided providers

    • OpenAI Compatible

  8. You will be prompted to enter an API Key, then fill in the provider information as prompted:

    • API Key

    • Endpoint URL

    • Model ID

    The popup content is as follows:

    json
    [
        {
            "name": "OpenAI Compatible",
            "vendor": "customoai",
            "apiKey": "******************",
            "models": [
                {
                    "id": "gpt-5.2",
                    "name": "gpt-5.2",
                    "url": {{apiUrl}},
                    "toolCalling": true,
                    "vision": true,
                    "maxInputTokens": 128000,
                    "maxOutputTokens": 16000
                }
            ]
        }
    ]
  9. After saving, return to the chat window.

  10. Open the model dropdown again and select the newly added model.

Applicable Scenarios ​

  • Want to switch to a third-party model in Copilot Chat

  • Want to use an external model with an API Key

  • Want to quickly verify if a model works properly in VS Code

VS Code + Claude Code ​

Prerequisites ​

Before starting, please confirm the following conditions:

  • Latest version of VS Code installed

  • Claude Code for VS Code extension installed

  • If connecting to third-party/external models, the following should be prepared:

    • API Key

    • Endpoint URL

    • Model names

Steps ​

  1. Open VS Code.

  2. Open settings.json, press shortcut: Mac: Cmd + Shift + P, Windows: Ctrl + Shift + P, type: Preferences: Open User Settings (JSON), press Enter.

  3. Add Claude Code configuration as follows (usually only ANTHROPIC_AUTH_TOKEN needs to be adjusted):

json
{
    // Other configuration items
    // ......
    "claudeCode.environmentVariables": [
        {
            "name": "ANTHROPIC_AUTH_TOKEN",
            "value": "******************"
        },
        {
            "name": "ANTHROPIC_BASE_URL",
            "value": {{apiUrl}}
        },
        {
            "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL",
            "value": "claude-haiku-4.5"
        },
        {
            "name": "ANTHROPIC_DEFAULT_SONNET_MODEL",
            "value": "claude-sonnet-4.5"
        },
        {
            "name": "ANTHROPIC_DEFAULT_OPUS_MODEL",
            "value": "claude-opus-4.5"
        },
        {
            "name": "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS",
            "value": "1"
        }
    ],
    "claudeCode.selectedModel": "claude-sonnet-4.5"
}
  • Restart VS Code

VS Code + Cline ​

Cline is an AI coding assistant plugin for VSCode that connects to the platform via the OpenAI Compatible protocol.

Install: Open VS Code, press Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows/Linux) to open the Extensions view, search for Cline, and click Install. After installation, click the Cline icon in the left sidebar to open the configuration panel.

Configure: In the configuration panel, select OpenAI Compatible, set the Base URL to https://neolink.com/api/v1 (note the trailing /v1), then enter your API Key and Model ID.

For detailed steps and FAQ, see Cline Configuration.