> ## Documentation Index
> Fetch the complete documentation index at: https://fireworks.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# VS Code

> Add Fireworks models and Nexus Auto to GitHub Copilot Chat in VS Code with the Nexus CLI or manual setup.

Nexus CLI adds a **Fireworks** provider to GitHub Copilot Chat's custom endpoints. This requires Copilot **Pro or Enterprise**.

PreviewOpenAI Chat CompletionsNexus Auto

## Quick start

**1. Install and sign in**

```bash wrap theme={null}
curl -fsSL https://nexus.fireworks.ai/install.sh | bash
```

You need Node.js 22 or later, `git`, and `bash`. On Windows, run the installer from Git Bash. PowerShell breaks the script's line endings.

```bash wrap theme={null}
nexus login
```

Sign in with your browser, or paste a Fireworks API key (`fw_...`).

Already set up? Skip to step 2.

**2. Quit VS Code**

**Quit VS Code before you connect or run `off`.** A running VS Code overwrites the change from memory. If it's open, Nexus CLI waits until you quit. `--force` writes anyway, which isn't recommended.

**3. Connect VS Code**

```bash wrap theme={null}
nexus vscode
nexus vscode status
```

**4. Restart and pick a model**

Restart VS Code, then pick a model under **Other Models → Fireworks** in Copilot Chat. The default is `auto`. To change the default, run `nexus vscode --model glm-latest`.

`glm-latest` and `glm-fast-latest` are text-only; `glm-flash-latest` supports images.

![VS Code Chat model picker showing the Fireworks provider with Auto selected and DeepSeek, GLM, and Kimi models](https://mintcdn.com/fireworksai-docs/wK7OMV3yh2TYEQdX/images/nexus/vscode-chat-model-picker.png?fit=max\&auto=format\&n=wK7OMV3yh2TYEQdX\&q=85\&s=daafc0f9cc914522e785ef6b97808b07)

VS Code Chat after Nexus CLI, with Auto selected under Fireworks

> [!TIP]
>
> `nexus vscode status` shows the provider, where the key comes from, and the configured model.

## Use Nexus Auto

Nexus Auto (`auto`) is supported on the Chat Completions API.

* **Anthropic and OpenAI model turns:** save a key with `nexus auto --anthropic-api-key` or `--openai-api-key` (each prompts for the key), then run `nexus vscode` again. Nexus CLI adds the saved key to the `auto` model's `requestHeaders` only. Or connect a [Provider Key](https://fireworks.ai/docs/nexus/provider-keys.md), which needs nothing saved locally.
* **Environment keys:** Nexus CLI never sends `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` from your environment.
* **Manual setup:** send `x-anthropic-api-key` and `x-openai-api-key` headers yourself. See [Manual setup (advanced)](#manual-setup-advanced).

## MCP and tools

Nexus CLI doesn't touch MCP. Set up servers in VS Code as usual.

Nexus CLI does not add web search to VS Code. See [Web Search](https://fireworks.ai/docs/nexus/web-search).

## Microsoft Foundry

Nexus CLI can connect VS Code to Fireworks models deployed in your Azure subscription. See [Nexus for Microsoft Foundry](https://fireworks.ai/docs/nexus/microsoft-foundry.md). Nexus Auto is not available on Foundry.

## Troubleshooting

* **401 errors after you rotate your key:** quit VS Code, then run `nexus login`. It saves the new key into every connected harness that keeps its own copy, including VS Code.

See [Nexus Auto](https://fireworks.ai/docs/nexus/auto.md#troubleshooting) for issues that affect every harness.

## Manual setup (advanced)

In Copilot Chat, open **Language Models**, click **+ Add Models...**, and choose **Custom Endpoint**. Use `https://api.fireworks.ai/inference/v1`, your Fireworks key, and a model ID such as `glm-latest`.

Follow the step-by-step screenshots in [GitHub Copilot](https://fireworks.ai/docs/ecosystem/integrations/github-copilot).

See [what changes without the Nexus CLI](https://fireworks.ai/docs/nexus/manual-setup.md#what-changes-without-the-nexus-cli).

## What the Nexus CLI writes

> **See what Nexus CLI writes**
>
> ```json chatLanguageModels.json theme={null}
> [
>   {
>     "name": "Fireworks",
>     "vendor": "customendpoint",
>     "apiType": "chat-completions",
>     "apiKey": "${input:chat.lm.secret.fw-...}",
>     "models": [
>       {
>         "id": "auto",
>         "name": "Auto",
>         "url": "https://api.fireworks.ai/inference",
>         "maxInputTokens": 1048575,
>         "maxOutputTokens": 131072,
>         "vision": true,
>         "toolCalling": true,
>         "requestHeaders": { "x-anthropic-api-key": "sk-ant-..." }
>       }
>     ]
>   }
> ]
> ```
>
> The `x-anthropic-api-key` and `x-openai-api-key` headers appear only on the `auto` row, and only for keys you saved with `nexus auto`. Nexus CLI also adds its own attribution headers to every row.
>
> The key is not in `chatLanguageModels.json`. It is stored in `state.vscdb` under a `chat.lm.secret.fw-*` ID, encrypted with Electron `safeStorage`. On Linux, encryption needs `libsecret`. Without it, VS Code only obfuscates the key and Nexus CLI warns you.
>
> | Platform | `chatLanguageModels.json` | `state.vscdb` |
> | - | - | - |
> | Linux | `~/.config/Code/User/` | `~/.config/Code/User/globalStorage/` |
> | macOS | `~/Library/Application Support/Code/User/` | `~/Library/Application Support/Code/User/globalStorage/` |
> | Windows | `%APPDATA%\Code\User\` | `%APPDATA%\Code\User\globalStorage\` |
>
> If only VS Code Insiders is installed, Nexus CLI uses its `Code - Insiders` folder instead. `off` restores `chatLanguageModels.json` byte-for-byte and deletes the secret. Providers you set up yourself are untouched. Use `--vscode-path` for a non-default `chatLanguageModels.json`. Nexus CLI then uses the `state.vscdb` next to it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.