copilot-custom-endpoint 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/docs/example-config.md +35 -11
- package/docs/models/deepseek.md +122 -8
- package/docs/models/glm.md +3 -3
- package/docs/models/kimi.md +2 -2
- package/docs/models/mimo.md +3 -3
- package/docs/models/minimax.md +4 -4
- package/docs/models/qwen.md +6 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,17 +20,17 @@ That's it. No code, no servers to manage (unless the model specifically needs th
|
|
|
20
20
|
|
|
21
21
|
## Pick a model
|
|
22
22
|
|
|
23
|
-
| Model | Provider | Needs proxy? | Vision | Setup guide
|
|
24
|
-
| ---------------------------- | --------- | ---------------------- | ------ |
|
|
25
|
-
| **Kimi K3.1 Pro** | Moonshot | **Yes** | ✅ | [Manual setup](docs/models/kimi.md)
|
|
26
|
-
| **MiMo V2.6 Pro** | Xiaomi | **Yes** | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) / [Manual setup](docs/models/mimo.md)
|
|
27
|
-
| **MiMo V2.6 Flash** | Xiaomi | **Yes** | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) / [Manual setup](docs/models/mimo.md)
|
|
28
|
-
| **MiMo V2.6 Pro UltraSpeed** | Xiaomi | **Yes** | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) / [Manual setup](docs/models/mimo.md)
|
|
29
|
-
| **Qwen 3.8 Max** | DashScope | Optional (recommended) | ✅ | [Manual setup](docs/models/qwen.md)
|
|
30
|
-
| **MiniMax M3.1 Flash** | MiniMax | No | ✅ | [Manual setup](docs/models/minimax.md)
|
|
31
|
-
| **GLM 5.3 Flash** | Z.ai | No | ✅ | [Manual setup](docs/models/glm.md)
|
|
32
|
-
| **GLM 5.3** | Z.ai | No | ❌ | [Manual setup](docs/models/glm.md)
|
|
33
|
-
| **DeepSeek V4.1 Flash 1017** | DeepSeek | No
|
|
23
|
+
| Model | Provider | Needs proxy? | Vision | Setup guide |
|
|
24
|
+
| ---------------------------- | --------- | ---------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
25
|
+
| **Kimi K3.1 Pro** | Moonshot | **Yes** | ✅ | [Manual setup](docs/models/kimi.md) |
|
|
26
|
+
| **MiMo V2.6 Pro** | Xiaomi | **Yes** | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) / [Manual setup](docs/models/mimo.md) |
|
|
27
|
+
| **MiMo V2.6 Flash** | Xiaomi | **Yes** | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) / [Manual setup](docs/models/mimo.md) |
|
|
28
|
+
| **MiMo V2.6 Pro UltraSpeed** | Xiaomi | **Yes** | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) / [Manual setup](docs/models/mimo.md) |
|
|
29
|
+
| **Qwen 3.8 Max** | DashScope | Optional (recommended) | ✅ | [Manual setup](docs/models/qwen.md) |
|
|
30
|
+
| **MiniMax M3.1 Flash** | MiniMax | No | ✅ | [Manual setup](docs/models/minimax.md) |
|
|
31
|
+
| **GLM 5.3 Flash** | Z.ai | No | ✅ | [Manual setup](docs/models/glm.md) |
|
|
32
|
+
| **GLM 5.3** | Z.ai | No | ❌ | [Manual setup](docs/models/glm.md) |
|
|
33
|
+
| **DeepSeek V4.1 Flash 1017** | DeepSeek | No | ✅ | [Manual setup](docs/models/deepseek.md) / [Extension](https://marketplace.visualstudio.com/items?itemName=Vizards.deepseek-v4-for-copilot) |
|
|
34
34
|
|
|
35
35
|
## Setup
|
|
36
36
|
|
|
@@ -61,7 +61,7 @@ If the file doesn't exist yet, create it with `[]` inside.
|
|
|
61
61
|
|
|
62
62
|
Open the setup guide for the model you picked (links in the table above) and copy its JSON snippet into the file. Each snippet is a single provider object inside the array.
|
|
63
63
|
|
|
64
|
-
> **⚠️
|
|
64
|
+
> **⚠️ `apiKey` must be non-empty** — the file's schema enforces `minLength: 1`, so `"apiKey": ""` raises _String is shorter than the minimum length of 1_. Keep the `${input:...}` placeholder from the snippet and fill it with the UI step below; a **literal** key pasted into this file is **not** used either. Measured on VS Code 1.146: an entry with a literal `apiKey` produced `Authorization: Bearer` with an empty token, so the provider answered `401` / "request failed".
|
|
65
65
|
|
|
66
66
|
> **The models don't appear in the picker yet.** After editing the file, open **Chat: Manage Language Models** once (or the picker's **Add Models…**) and close it. Measured on 1.146: until the editor has been opened in that window, the picker lists only extension-provided models while the editor already shows your provider.
|
|
67
67
|
|
package/docs/example-config.md
CHANGED
|
@@ -8,7 +8,7 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
8
8
|
|
|
9
9
|
> **Utility models:** with a GitHub Copilot token, VS Code already uses its built-in utility models, so no extra setup is required. If you use BYOK without Copilot sign-in, set **Chat: Utility Model** and **Chat: Utility Small Model** (or `chat.byokUtilityModelDefault` → _Main Agent Model_). See the [main README](../README.md#4-configure-the-utility-small-model).
|
|
10
10
|
|
|
11
|
-
> **Note:**
|
|
11
|
+
> **Note:** `apiKey` must be a **non-empty** string — VS Code's schema enforces `minLength: 1`, so `"apiKey": ""` shows _String is shorter than the minimum length of 1_. The snippets below use a `${input:...}` reference, and the reliable way to populate it is the **Chat: Manage Language Models** UI (Command Palette → provider group → **Update API Key**), which stores the key in the OS keychain and rewrites the value to `${input:chat.lm.secret.<id>}`. A key pasted directly into this file as a literal is not used on 1.146: the request goes out as `Authorization: Bearer` with an empty token and the provider rejects it.
|
|
12
12
|
|
|
13
13
|
> **After saving, open the Language Models editor once.** On 1.146 a provider added to this file stays invisible in the model picker until **Chat: Manage Language Models** (or the picker's **Add Models…**) has been opened in that window; the editor itself shows the provider immediately. If your provider's `name` matches an installed extension (for example `GLM` with the Z.ai extension installed), the picker merges them and your models hide behind the extension group — give the provider a distinct name.
|
|
14
14
|
|
|
@@ -19,12 +19,12 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
19
19
|
{
|
|
20
20
|
"name": "Qwen",
|
|
21
21
|
"vendor": "customendpoint",
|
|
22
|
-
"apiKey": "",
|
|
22
|
+
"apiKey": "${input:qwenApiKey}",
|
|
23
23
|
"apiType": "chat-completions",
|
|
24
24
|
"models": [
|
|
25
25
|
{
|
|
26
26
|
"id": "qwen3.8-max",
|
|
27
|
-
"name": "Qwen 3.8 Max
|
|
27
|
+
"name": "Qwen 3.8 Max",
|
|
28
28
|
"url": "http://127.0.0.1:3458/v1/chat/completions",
|
|
29
29
|
"toolCalling": true,
|
|
30
30
|
"vision": true,
|
|
@@ -37,12 +37,12 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
37
37
|
{
|
|
38
38
|
"name": "Kimi",
|
|
39
39
|
"vendor": "customendpoint",
|
|
40
|
-
"apiKey": "",
|
|
40
|
+
"apiKey": "${input:kimiApiKey}",
|
|
41
41
|
"apiType": "chat-completions",
|
|
42
42
|
"models": [
|
|
43
43
|
{
|
|
44
44
|
"id": "kimi-k3.1-pro",
|
|
45
|
-
"name": "Kimi K3.1 Pro
|
|
45
|
+
"name": "Kimi K3.1 Pro",
|
|
46
46
|
"url": "http://127.0.0.1:3457/v1/chat/completions",
|
|
47
47
|
"modelOptions": { "temperature": 1 },
|
|
48
48
|
"supportsReasoningEffort": ["low", "high", "max"],
|
|
@@ -59,7 +59,7 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
59
59
|
{
|
|
60
60
|
"name": "MiMo",
|
|
61
61
|
"vendor": "customendpoint",
|
|
62
|
-
"apiKey": "",
|
|
62
|
+
"apiKey": "${input:mimoApiKey}",
|
|
63
63
|
"apiType": "chat-completions",
|
|
64
64
|
"models": [
|
|
65
65
|
{
|
|
@@ -100,12 +100,12 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
100
100
|
{
|
|
101
101
|
"name": "MiniMax",
|
|
102
102
|
"vendor": "customendpoint",
|
|
103
|
-
"apiKey": "",
|
|
103
|
+
"apiKey": "${input:minimaxApiKey}",
|
|
104
104
|
"apiType": "chat-completions",
|
|
105
105
|
"models": [
|
|
106
106
|
{
|
|
107
107
|
"id": "MiniMax-M3.1-Flash",
|
|
108
|
-
"name": "MiniMax M3.1 Flash
|
|
108
|
+
"name": "MiniMax M3.1 Flash",
|
|
109
109
|
"url": "https://api.minimax.io/v1/chat/completions",
|
|
110
110
|
"toolCalling": true,
|
|
111
111
|
"vision": true,
|
|
@@ -122,12 +122,12 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
122
122
|
{
|
|
123
123
|
"name": "GLM",
|
|
124
124
|
"vendor": "customendpoint",
|
|
125
|
-
"apiKey": "",
|
|
125
|
+
"apiKey": "${input:glmApiKey}",
|
|
126
126
|
"apiType": "chat-completions",
|
|
127
127
|
"models": [
|
|
128
128
|
{
|
|
129
129
|
"id": "glm-5.3-flash",
|
|
130
|
-
"name": "GLM 5.3 Flash
|
|
130
|
+
"name": "GLM 5.3 Flash",
|
|
131
131
|
"url": "https://api.z.ai/api/paas/v4/chat/completions",
|
|
132
132
|
"toolCalling": true,
|
|
133
133
|
"vision": true,
|
|
@@ -154,6 +154,28 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
154
154
|
"thinking": true
|
|
155
155
|
}
|
|
156
156
|
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "DeepSeek API",
|
|
160
|
+
"vendor": "customendpoint",
|
|
161
|
+
"apiKey": "${input:deepseekApiKey}",
|
|
162
|
+
"apiType": "chat-completions",
|
|
163
|
+
"models": [
|
|
164
|
+
{
|
|
165
|
+
"id": "deepseek-flash",
|
|
166
|
+
"name": "DeepSeek V4.1 Flash",
|
|
167
|
+
"url": "https://api.deepseek.com/v1/chat/completions",
|
|
168
|
+
"toolCalling": true,
|
|
169
|
+
"vision": true,
|
|
170
|
+
"streaming": true,
|
|
171
|
+
"maxInputTokens": 917504,
|
|
172
|
+
"maxOutputTokens": 131072,
|
|
173
|
+
"modelOptions": { "temperature": 1, "top_p": 0.95 },
|
|
174
|
+
"supportsReasoningEffort": ["low", "high", "max"],
|
|
175
|
+
"reasoningEffortFormat": "chat-completions",
|
|
176
|
+
"thinking": true
|
|
177
|
+
}
|
|
178
|
+
]
|
|
157
179
|
}
|
|
158
180
|
]
|
|
159
181
|
```
|
|
@@ -169,6 +191,7 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
169
191
|
> | `mimo-v2.6-*` | 1,048,576 | 131,072 | 917,504 |
|
|
170
192
|
> | `MiniMax-M3.1-Flash` | 1,000,000 | 131,072 | 868,928 |
|
|
171
193
|
> | `glm-5.3`, `glm-5.3-flash` | 1,048,576 | 131,072 | 917,504 |
|
|
194
|
+
> | `deepseek-flash` | 1,048,576 | 131,072 | 917,504 |
|
|
172
195
|
>
|
|
173
196
|
> Trade-off: a smaller `maxInputTokens` makes VS Code compact the conversation slightly earlier than the provider's raw input cap (for example 868,928 instead of DashScope's 991,000-token input maximum), which is the safe side of the constraint. Alternatively set `contextWindow` to the provider's window and let VS Code derive `maxInputTokens = contextWindow − maxOutputTokens`. Sources and derivation: [harness research § 4](research/vscode-1.146-copilot-harness.md#4-utility-models-and-context-limits).
|
|
174
197
|
|
|
@@ -179,5 +202,6 @@ If you only need one provider, jump straight to its setup guide:
|
|
|
179
202
|
- [Xiaomi MiMo (V2.6 Pro / Flash / Pro UltraSpeed)](models/mimo.md)
|
|
180
203
|
- [MiniMax M3.1 Flash](models/minimax.md)
|
|
181
204
|
- [GLM (5.3 Flash / 5.3 / 5.2 / 5.1)](models/glm.md)
|
|
205
|
+
- [DeepSeek V4.1 Flash](models/deepseek.md)
|
|
182
206
|
|
|
183
|
-
> **DeepSeek V4.1 Flash
|
|
207
|
+
> **DeepSeek V4.1 Flash** is also available as the [DeepSeek for Copilot Chat extension](https://marketplace.visualstudio.com/items?itemName=Vizards.deepseek-v4-for-copilot). That route appears in `chatLanguageModels.json` as `vendor: "deepseek"` (not `customendpoint`) and is configured via the extension's settings block; the block above is the plain custom-endpoint route. Name the provider `DeepSeek API` rather than `DeepSeek` when the extension is installed, otherwise the custom endpoint hides behind the extension's picker group.
|
package/docs/models/deepseek.md
CHANGED
|
@@ -1,6 +1,104 @@
|
|
|
1
|
-
# DeepSeek V4.1 Flash
|
|
2
|
-
|
|
3
|
-
DeepSeek
|
|
1
|
+
# DeepSeek V4.1 Flash — VS Code Custom Endpoint Setup Guide
|
|
2
|
+
|
|
3
|
+
> **TL;DR:** DeepSeek works directly with VS Code's custom-endpoint provider — **no proxy needed**. The API is OpenAI Chat Completions compatible at `https://api.deepseek.com/v1/chat/completions`.
|
|
4
|
+
>
|
|
5
|
+
> **Wire-validated 2026-11-14** against the live DeepSeek API by replaying the exact request shape VS Code 1.146 sends (the field and role union measured from this repo's own captures — `enable_thinking`, `max_completion_tokens`, `max_tokens`, `messages`, `model`, `n`, `reasoning_effort`, `stream`, `stream_options`, `temperature`, `thinking`, `tool_choice`, `tools`, `top_p`; roles `system` / `user` / `assistant` / `tool`). Every one of those shapes returned HTTP 200, including a streamed 128-tool agent loop with `tool_choice: "auto"` and a replayed `reasoning_content` tool follow-up. The picker/UI pass (SecretStorage key, model-picker refresh) was **not** repeated; see [harness research § 9](../../research/vscode-1.146-copilot-harness.md#9-phase-3-live-provider-validation-2026-11-13) for the setup steps that apply to every provider.
|
|
6
|
+
>
|
|
7
|
+
> **Billing:** Pay-as-you-go with peak/off-peak rates (see [pricing](#current-api-pricing)). There is also a [DeepSeek for Copilot Chat extension](https://marketplace.visualstudio.com/items?itemName=Vizards.deepseek-v4-for-copilot) route, which is the only way to get reasoning visibility and the `activate_*` tool-list preflight — see [the extension route](#alternative-the-deepseek-copilot-chat-extension).
|
|
8
|
+
|
|
9
|
+
## At a Glance
|
|
10
|
+
|
|
11
|
+
| Field | Value |
|
|
12
|
+
| ---------------- | ----------------------------------------------------------------------- |
|
|
13
|
+
| Mode | **Direct** (no proxy) |
|
|
14
|
+
| Vision | ✅ Yes on `deepseek-flash`; ❌ on `deepseek-v4-pro` (text-only) |
|
|
15
|
+
| Tool calling | ✅ Yes — `tool_choice` must be `auto` (or omitted) while thinking is on |
|
|
16
|
+
| Context | 1,048,576 |
|
|
17
|
+
| Max output | 393,216 (API cap); the config below declares 131,072 |
|
|
18
|
+
| Supported config | `modelOptions` sampling + `supportsReasoningEffort` + `thinking: true` |
|
|
19
|
+
| Endpoint | `https://api.deepseek.com/v1/chat/completions` |
|
|
20
|
+
| Auth | `Authorization: Bearer $DEEPSEEK_API_KEY` |
|
|
21
|
+
|
|
22
|
+
### Models
|
|
23
|
+
|
|
24
|
+
| Model | Vision | Context | Max output | Notes |
|
|
25
|
+
| ----------------- | ------ | --------- | ---------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| `deepseek-flash` | ✅ | 1,048,576 | 393,216 | Current Flash build (V4.1-Flash-1017) — always-thinking by default, `reasoning_effort` `low`/`high`/`max` (default `high`) |
|
|
27
|
+
| `deepseek-v4-pro` | ❌ | 1,048,576 | 393,216 | Pro tier — **text-only**; accepts the image field but cannot see it, and answers as if no image was sent |
|
|
28
|
+
|
|
29
|
+
> `GET /v1/models` reports `context_window: 1048576`, `max_output_tokens: 393216`, and `effort.supported_levels: ["low","high","max"]` for both models. `deepseek-v4-pro` is not in the default block below; add it in the same shape if you need it.
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
1. **Create an API key** at [platform.deepseek.com](https://platform.deepseek.com/api_keys).
|
|
34
|
+
2. **Edit `chatLanguageModels.json`** — add the DeepSeek block below.
|
|
35
|
+
3. **Set the API key** via Command Palette → **Chat: Manage Language Models** → **DeepSeek API** → **Update API Key**.
|
|
36
|
+
4. **Open that editor once** so the provider appears in the picker, then select **DeepSeek V4.1 Flash**.
|
|
37
|
+
5. **Re-pick the session target** for each new chat if you are on the Local harness.
|
|
38
|
+
|
|
39
|
+
## Setup
|
|
40
|
+
|
|
41
|
+
### 1. VS Code configuration
|
|
42
|
+
|
|
43
|
+
| OS | Path |
|
|
44
|
+
| ------- | ----------------------------------------------------------------- |
|
|
45
|
+
| Windows | `%APPDATA%\Code\User\chatLanguageModels.json` |
|
|
46
|
+
| macOS | `~/Library/Application Support/Code/User/chatLanguageModels.json` |
|
|
47
|
+
| Linux | `~/.config/Code/User/chatLanguageModels.json` |
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"name": "DeepSeek API",
|
|
52
|
+
"vendor": "customendpoint",
|
|
53
|
+
"apiKey": "${input:deepseekApiKey}",
|
|
54
|
+
"apiType": "chat-completions",
|
|
55
|
+
"models": [
|
|
56
|
+
{
|
|
57
|
+
"id": "deepseek-flash",
|
|
58
|
+
"name": "DeepSeek V4.1 Flash",
|
|
59
|
+
"url": "https://api.deepseek.com/v1/chat/completions",
|
|
60
|
+
"toolCalling": true,
|
|
61
|
+
"vision": true,
|
|
62
|
+
"streaming": true,
|
|
63
|
+
"maxInputTokens": 917504,
|
|
64
|
+
"maxOutputTokens": 131072,
|
|
65
|
+
"modelOptions": { "temperature": 1, "top_p": 0.95 },
|
|
66
|
+
"supportsReasoningEffort": ["low", "high", "max"],
|
|
67
|
+
"reasoningEffortFormat": "chat-completions",
|
|
68
|
+
"thinking": true
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
> **Name the provider something other than `DeepSeek`.** If the DeepSeek Copilot extension is installed, an identical provider name hides your custom endpoint behind that extension's picker group. `DeepSeek API` avoids the collision.
|
|
75
|
+
|
|
76
|
+
> **Context budget:** `917504 + 131072 = 1048576`, the DeepSeek window (input and output combined). Only raise `maxInputTokens` by lowering `maxOutputTokens`.
|
|
77
|
+
|
|
78
|
+
> **`apiKey` must be non-empty** — the file's schema enforces `minLength: 1`, so `"apiKey": ""` shows _String is shorter than the minimum length of 1_. Use the `${input:...}` placeholder shown above and fill it through the UI (below), which rewrites it to a `${input:chat.lm.secret.<id>}` keychain reference.
|
|
79
|
+
|
|
80
|
+
### 2. API Key
|
|
81
|
+
|
|
82
|
+
1. Open the Command Palette (`Ctrl+Shift+P`).
|
|
83
|
+
2. Run **Chat: Manage Language Models**.
|
|
84
|
+
3. Find the **DeepSeek API** group → **Update API Key**.
|
|
85
|
+
4. Paste your DeepSeek API key.
|
|
86
|
+
|
|
87
|
+
## Notes
|
|
88
|
+
|
|
89
|
+
- **Model IDs are `deepseek-flash` and `deepseek-v4-pro` only.** Anything else is rejected with an explicit list: `The supported API model names are deepseek-flash, deepseek-v4-pro, but you passed …`. The human-readable build label `DeepSeek-V4.1-Flash-1017` is **not** a valid model ID.
|
|
90
|
+
- **`tool_choice` must stay `auto` while thinking is on.** `required` and named-tool `tool_choice` both return **HTTP 400 `Thinking mode does not support this tool_choice`**. VS Code sends `auto` (measured in this repo's captures), so the default works; the constraint only bites if you force a tool choice. Disabling thinking (`thinking: {"type":"disabled"}` or `reasoning_effort: "none"`) makes `required` and named tools return 200.
|
|
91
|
+
- **Thinking is on by default and can be turned off.** `GET /v1/models` advertises `low`/`high`/`max`; in practice `reasoning_effort` also accepts `medium`, `minimal`, and `xhigh` (clamped, not advertised), while `none` genuinely disables thinking and returns zero reasoning tokens. `thinking: {"type": "disabled"}` does the same. This differs from Kimi K2.7 (rejects `disabled`) and MiniMax M3.1 Flash (rejects `disabled`).
|
|
92
|
+
- **`reasoning_effort` measurably changes depth.** On a multi-step change-counting task, three runs each produced ≈1,463 reasoning tokens at `low`, ≈1,644 at `high`, and ≈3,253 at `max`. `low` also answered **wrong** (4 instead of 24) while `high`/`max` were correct — prefer `high` or `max` for coding and agent work.
|
|
93
|
+
- **Sampling is flexible but `n` is not.** `temperature` accepted `0`, `1`, and `1.5` with no server-side cap; `top_p` must be in `(0, 1.0]` (`0` and `1.1` both 400); `n` must be exactly `1` (`n: 2` and `n: 0` both 400). VS Code sends `n: 1`, so this only matters for hand-built requests. `presence_penalty` / `frequency_penalty` are accepted.
|
|
94
|
+
- **Output caps:** `max_tokens` valid range is `[1, 393216]`; `max_completion_tokens` is also accepted, and sending both together is fine. On 1.146 `maxOutputTokens` reaches the wire as `max_completion_tokens` only for `thinking: true` entries — which this block is.
|
|
95
|
+
- **Reasoning replay is optional, not required.** A tool-loop follow-up returned 200 both with and without `reasoning_content` on the assistant tool-call message (unlike Kimi K2.7, which rejects some shapes). Replaying it preserves reasoning continuity.
|
|
96
|
+
- **Streaming includes everything VS Code needs:** `reasoning_content` deltas, `tool_calls` deltas, `finish_reason`, and a usage chunk when `stream_options.include_usage` is set.
|
|
97
|
+
- **Vision accepts data URLs only in practice.** A base64 `data:image/png;…` URL was read correctly on `deepseek-flash` ("Red" for a solid red image); a public HTTPS image URL failed with `Failed to download image from …`. `deepseek-v4-pro` accepts the image field but is text-only and answers as if no image was sent.
|
|
98
|
+
- **Only four message roles exist:** `system`, `user`, `assistant`, `tool`. A `developer` role returns **HTTP 422** (`unknown variant 'developer'`). VS Code sends exactly the four supported roles, so this is a constraint for non-VS Code clients, not for the picker path.
|
|
99
|
+
- **Unknown top-level fields are ignored, not rejected** — the API is lenient about extra keys, which is why a dropped `requestBody` never breaks the request.
|
|
100
|
+
- **No proxy is needed for thinking control, including in tool loops.** The [Qwen proxy](../../proxy/qwen-proxy.mjs) exists because DashScope's `enable_thinking` cannot be sent from `chatLanguageModels.json` on 1.146 (`requestBody` is dropped) and thinking must be suppressed once tools appear. DeepSeek has neither problem: it accepts thinking during tool loops (measured 2026-11-14 — a 5-turn read/edit agent loop returned HTTP 200 on every turn with thinking on, and DeepSeek spent 0 reasoning tokens on three of those turns anyway), and the effort level already reaches the wire through `supportsReasoningEffort` + `reasoningEffortFormat: "chat-completions"`. Only _automatic_ per-turn switching would require a proxy, and the measurements show it buys nothing here.
|
|
101
|
+
- **Context caching is automatic** — `usage.prompt_cache_hit_tokens` / `prompt_cache_miss_tokens` and `usage.prompt_tokens_details.cached_tokens` report it.
|
|
4
102
|
|
|
5
103
|
## Current build
|
|
6
104
|
|
|
@@ -14,11 +112,15 @@ The [DeepSeek API pricing page](https://api-docs.deepseek.com/quick_start/pricin
|
|
|
14
112
|
|
|
15
113
|
DeepSeek's [October 17 release note](https://api-docs.deepseek.com/news/news261017) describes 1017 as a Pareto improvement over the September 10 build: stronger benchmarks, faster task completion, and shorter outputs. The model supports both non-thinking and thinking (default) modes, keeps the 1M context window and vision input, and publishes open weights on [Hugging Face](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017) (552B total / 16B active parameters, MIT license).
|
|
16
114
|
|
|
17
|
-
##
|
|
115
|
+
## Alternative: the DeepSeek Copilot Chat extension
|
|
116
|
+
|
|
117
|
+
DeepSeek V4.1 Flash is also available through the extension-only provider. It appears in `chatLanguageModels.json` as `vendor: "deepseek"` (not `customendpoint`) and is configured through the extension's own settings block. The sections below document that route; [benchmarks](#benchmarks) and [pricing](#current-api-pricing) apply to both routes.
|
|
118
|
+
|
|
119
|
+
### Model ID overrides
|
|
18
120
|
|
|
19
121
|
The extension's `deepseek-copilot.modelIdOverrides` setting changes the upstream API model ID while keeping the normal DeepSeek entry in the Copilot model picker. The current official DeepSeek Chat Completions API accepts `deepseek-flash`, so map the extension's logical Flash entry to that canonical ID.
|
|
20
122
|
|
|
21
|
-
> **Warning:** Do **not** use the human-readable version label as a model ID. `DeepSeek-V4.1-Flash-1017` is a version string, not a valid `model` field; use `deepseek-flash`. Sending a version-suffixed ID to `https://api.deepseek.com`
|
|
123
|
+
> **Warning:** Do **not** use the human-readable version label as a model ID. `DeepSeek-V4.1-Flash-1017` is a version string, not a valid `model` field; use `deepseek-flash`. Sending a version-suffixed ID to `https://api.deepseek.com` returns **HTTP 400** — measured 2026-11-14: `The supported API model names are deepseek-flash, deepseek-v4-pro, but you passed DeepSeek-V4.1-Flash-1017.`
|
|
22
124
|
|
|
23
125
|
Only add an override when the configured `deepseek-copilot.baseUrl` expects a different model name (e.g., a third-party proxy). The left-hand key is the extension's logical model key; it is not an arbitrary picker label. The right-hand value is sent verbatim as the provider's `model` field.
|
|
24
126
|
|
|
@@ -40,7 +142,7 @@ DeepSeek switched to peak/off-peak rates at **16:00 UTC on August 16, 2026**. Pr
|
|
|
40
142
|
|
|
41
143
|
The 1017 build keeps these rates unchanged. See the [official Models & Pricing page](https://api-docs.deepseek.com/quick_start/pricing) for the live rates and concurrency limits.
|
|
42
144
|
|
|
43
|
-
## Tool-list stabilization (`experimental.stabilizeToolList`)
|
|
145
|
+
## Tool-list stabilization — extension route (`experimental.stabilizeToolList`)
|
|
44
146
|
|
|
45
147
|
`deepseek-copilot.experimental.stabilizeToolList` (default `false`) gates an `activate_*` tool **preflight pass** that runs only on tool-calling (agent-mode / MCP) requests. Verified against extension `0.6.2` source: the flag is read in `out/provider/index.js` and only branches inside `out/provider/tools/flow.js` (`if (!stabilizeToolList) { … return }`).
|
|
46
148
|
|
|
@@ -52,13 +154,25 @@ Recommendation: leave it `true` if you use **agent mode or MCP tools** with Deep
|
|
|
52
154
|
|
|
53
155
|
## Troubleshooting
|
|
54
156
|
|
|
157
|
+
### Custom endpoint
|
|
158
|
+
|
|
159
|
+
1. **Model missing from the picker** — open **Chat: Manage Language Models** once in the window, then re-check. If the DeepSeek extension is installed, make sure your provider block is not also named `DeepSeek`; rename it (`DeepSeek API`) to escape the extension's picker group.
|
|
160
|
+
2. **401 / 403** — set the key through **Chat: Manage Language Models → Update API Key**. A literal `apiKey` in `chatLanguageModels.json` is not sent; VS Code sends an empty `Bearer` token.
|
|
161
|
+
3. **400 listing the supported model names** — you used a version label such as `DeepSeek-V4.1-Flash-1017`. Use `deepseek-flash` or `deepseek-v4-pro`.
|
|
162
|
+
4. **400 `Thinking mode does not support this tool_choice`** — something is forcing `required` or a named tool. Keep `tool_choice` at `auto`, or disable thinking.
|
|
163
|
+
5. **`top_p` / `n` rejected** — `top_p` must be in `(0, 1.0]` and `n` must be exactly `1`.
|
|
164
|
+
6. **Image ignored** — use `deepseek-flash` (not the text-only `deepseek-v4-pro`) and attach a base64 data URL; public image URLs fail with `Failed to download image from …`.
|
|
165
|
+
7. **422 `unknown variant 'developer'`** — a non-VS Code client sent a `developer` role. Only `system`, `user`, `assistant`, and `tool` are accepted.
|
|
166
|
+
|
|
167
|
+
### Extension route
|
|
168
|
+
|
|
55
169
|
1. Confirm the extension is installed and update it if the setting is not recognized. The setting is owned by `Vizards.deepseek-v4-for-copilot`.
|
|
56
170
|
2. Use the exact setting name and point the Flash entry at `deepseek-flash`:
|
|
57
171
|
`deepseek-copilot.modelIdOverrides`.
|
|
58
172
|
3. Reload VS Code after changing the setting (`Developer: Reload Window`).
|
|
59
173
|
4. Verify the extension's `deepseek-copilot.baseUrl` points at the compatible provider or proxy. An override changes only the model ID; it does not change the endpoint, authentication, request format, or model capabilities.
|
|
60
174
|
5. For HTTP 400 errors during agent mode or MCP/tool use, enable the extension's tool-list compatibility option:
|
|
61
|
-
`deepseek-copilot.experimental.stabilizeToolList: true` (see
|
|
175
|
+
`deepseek-copilot.experimental.stabilizeToolList: true` (see **Tool-list stabilization — extension route** above). This does **not** help plain-chat 400s — those are usually an invalid `model` ID (see the override warning above).
|
|
62
176
|
6. Enable the extension's diagnostic mode (`deepseek-copilot.debugMode: "verbose"`) or inspect its request dump to confirm the outbound request's `model` field. The canonical current Flash value should read `"model":"deepseek-flash"`. If a 400 persists with a valid model ID, the remaining cause is request-shape compatibility or authorization — capture the full request body via the dump and compare against the [Chat Completions schema](https://api-docs.deepseek.com/api/create-chat-completion).
|
|
63
177
|
|
|
64
|
-
The extension's published settings documentation is authoritative for
|
|
178
|
+
The extension's published settings documentation is authoritative for these settings. Its default model-ID map may change between releases, so do not copy an old default blindly.
|
package/docs/models/glm.md
CHANGED
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
{
|
|
64
64
|
"name": "GLM",
|
|
65
65
|
"vendor": "customendpoint",
|
|
66
|
-
"apiKey": "",
|
|
66
|
+
"apiKey": "${input:glmApiKey}",
|
|
67
67
|
"apiType": "chat-completions",
|
|
68
68
|
"models": [
|
|
69
69
|
{
|
|
70
70
|
"id": "glm-5.3-flash",
|
|
71
|
-
"name": "GLM 5.3 Flash
|
|
71
|
+
"name": "GLM 5.3 Flash",
|
|
72
72
|
"url": "https://api.z.ai/api/paas/v4/chat/completions",
|
|
73
73
|
"toolCalling": true,
|
|
74
74
|
"vision": true,
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
|
|
101
101
|
> **Context budget:** `917504 + 131072 = 1048576`, the GLM 5.x window (input and output combined). VS Code uses that sum as the model's total context, so only raise `maxInputTokens` by lowering `maxOutputTokens`.
|
|
102
102
|
|
|
103
|
-
> **
|
|
103
|
+
> **`apiKey` must be non-empty** — the file's schema enforces `minLength: 1`, so `"apiKey": ""` shows _String is shorter than the minimum length of 1_. Use the `${input:...}` placeholder shown above and set it through the Language Models UI, which stores it in the OS keychain and rewrites the value to a `${input:chat.lm.secret.<id>}` reference.
|
|
104
104
|
> If you signed up on `bigmodel.cn` (China), swap the `url` values in the block above to the regional endpoint `https://open.bigmodel.cn/api/paas/v4/chat/completions`.
|
|
105
105
|
|
|
106
106
|
### 2. API Key
|
package/docs/models/kimi.md
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
{
|
|
56
56
|
"name": "Kimi",
|
|
57
57
|
"vendor": "customendpoint",
|
|
58
|
-
"apiKey": "",
|
|
58
|
+
"apiKey": "${input:kimiApiKey}",
|
|
59
59
|
"apiType": "chat-completions",
|
|
60
60
|
"models": [
|
|
61
61
|
{
|
|
@@ -89,7 +89,7 @@ Kimi is **Pay-as-You-Go only** — no subscription. A single Open Platform API k
|
|
|
89
89
|
3. Find the **Kimi** group → **Update API Key**.
|
|
90
90
|
4. Paste your Moonshot / Kimi Platform API key.
|
|
91
91
|
|
|
92
|
-
>
|
|
92
|
+
> **`apiKey` must be non-empty** — the file's schema enforces `minLength: 1`, so `"apiKey": ""` shows _String is shorter than the minimum length of 1_. Use the `${input:...}` placeholder shown above and set it through the Language Models UI, which rewrites it to a `${input:chat.lm.secret.<id>}` keychain reference. Kimi Platform (formerly Moonshot) rebranded to `platform.kimi.ai` in 2026 — `api.moonshot.ai` still resolves and the proxy targets it unchanged.
|
|
93
93
|
|
|
94
94
|
## Local Proxy
|
|
95
95
|
|
package/docs/models/mimo.md
CHANGED
|
@@ -108,7 +108,7 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
|
|
|
108
108
|
{
|
|
109
109
|
"name": "MiMo",
|
|
110
110
|
"vendor": "customendpoint",
|
|
111
|
-
"apiKey": "",
|
|
111
|
+
"apiKey": "${input:mimoApiKey}",
|
|
112
112
|
"apiType": "chat-completions",
|
|
113
113
|
"models": [
|
|
114
114
|
{
|
|
@@ -154,7 +154,7 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
|
|
|
154
154
|
{
|
|
155
155
|
"name": "MiMo",
|
|
156
156
|
"vendor": "customendpoint",
|
|
157
|
-
"apiKey": "",
|
|
157
|
+
"apiKey": "${input:mimoApiKey}",
|
|
158
158
|
"apiType": "chat-completions",
|
|
159
159
|
"models": [
|
|
160
160
|
{
|
|
@@ -201,7 +201,7 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
|
|
|
201
201
|
3. Find the **MiMo** group → **Update API Key**.
|
|
202
202
|
4. Paste your MiMo API key.
|
|
203
203
|
|
|
204
|
-
>
|
|
204
|
+
> **`apiKey` must be non-empty** — the file's schema enforces `minLength: 1`, so `"apiKey": ""` shows _String is shorter than the minimum length of 1_. Use the `${input:...}` placeholder shown above and set it through the Language Models UI, which rewrites it to a `${input:chat.lm.secret.<id>}` keychain reference. The extension uses its own **MiMo: Set API Key** command instead — skip this step if using the extension.
|
|
205
205
|
|
|
206
206
|
### 2. Token Plan (optional, all methods)
|
|
207
207
|
|
package/docs/models/minimax.md
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
1. **Edit `chatLanguageModels.json`** — add the MiniMax block below.
|
|
42
42
|
2. **Set your `MINIMAX_API_KEY`** via Command Palette → **Chat: Manage Language Models**.
|
|
43
43
|
3. **Configure the Utility Small Model** — Open Settings → search **"Chat: Utility Small Model"** → pick your fastest model (e.g., DeepSeek V4.1 Flash or MiMo V2.6 Flash). [Why?](../../README.md#4-configure-the-utility-small-model)
|
|
44
|
-
4. **Restart VS Code** and pick "MiniMax M3.1 Flash
|
|
44
|
+
4. **Restart VS Code** and pick "MiniMax M3.1 Flash" in the chat picker.
|
|
45
45
|
|
|
46
46
|
## Setup
|
|
47
47
|
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
{
|
|
67
67
|
"name": "MiniMax",
|
|
68
68
|
"vendor": "customendpoint",
|
|
69
|
-
"apiKey": "",
|
|
69
|
+
"apiKey": "${input:minimaxApiKey}",
|
|
70
70
|
"apiType": "chat-completions",
|
|
71
71
|
"models": [
|
|
72
72
|
{
|
|
73
73
|
"id": "MiniMax-M3.1-Flash",
|
|
74
|
-
"name": "MiniMax M3.1 Flash
|
|
74
|
+
"name": "MiniMax M3.1 Flash",
|
|
75
75
|
"url": "https://api.minimax.io/v1/chat/completions",
|
|
76
76
|
"toolCalling": true,
|
|
77
77
|
"vision": true,
|
|
@@ -113,7 +113,7 @@ The two keys are **not interchangeable** — a Subscription Key against a PAYG-o
|
|
|
113
113
|
3. Find the **MiniMax** group → **Update API Key**.
|
|
114
114
|
4. Paste your **Open Platform API Key** from `platform.minimax.io/user-center/basic-information/interface-key`.
|
|
115
115
|
|
|
116
|
-
>
|
|
116
|
+
> **`apiKey` must be non-empty** — the file's schema enforces `minLength: 1`, so `"apiKey": ""` shows _String is shorter than the minimum length of 1_. Use the `${input:...}` placeholder shown above and set it through the Language Models UI, which rewrites it to a `${input:chat.lm.secret.<id>}` keychain reference.
|
|
117
117
|
|
|
118
118
|
#### Option B — Token Plan Subscription Key
|
|
119
119
|
|
package/docs/models/qwen.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Qwen (DashScope) — VS Code Custom Endpoint Setup Guide
|
|
2
2
|
|
|
3
|
-
> **TL;DR:** `qwen3.8-max`
|
|
3
|
+
> **TL;DR:** `qwen3.8-max` works both direct and via the local proxy. The proxy forwards the upstream `model` value unchanged, so use the exact model ID supported by the endpoint you choose. The proxy gives you dynamic thinking suppression: reasoning stays ON in plain chat but turns OFF automatically when tools are invoked. The direct path is simpler if you don't need reasoning in chat. Use the **OpenAI-compatible** endpoint on your **workspace-dedicated** domain ([details](#which-endpoint-to-use)).
|
|
4
4
|
|
|
5
5
|
## At a Glance
|
|
6
6
|
|
|
@@ -80,12 +80,12 @@ API keys are bound to their region (and, on a workspace-dedicated domain, to the
|
|
|
80
80
|
{
|
|
81
81
|
"name": "Qwen",
|
|
82
82
|
"vendor": "customendpoint",
|
|
83
|
-
"apiKey": "",
|
|
83
|
+
"apiKey": "${input:qwenApiKey}",
|
|
84
84
|
"apiType": "chat-completions",
|
|
85
85
|
"models": [
|
|
86
86
|
{
|
|
87
87
|
"id": "qwen3.8-max",
|
|
88
|
-
"name": "Qwen 3.8 Max
|
|
88
|
+
"name": "Qwen 3.8 Max",
|
|
89
89
|
"url": "https://<your-workspace-id>.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1/chat/completions",
|
|
90
90
|
"toolCalling": true,
|
|
91
91
|
"vision": true,
|
|
@@ -122,12 +122,12 @@ API keys are bound to their region (and, on a workspace-dedicated domain, to the
|
|
|
122
122
|
{
|
|
123
123
|
"name": "Qwen",
|
|
124
124
|
"vendor": "customendpoint",
|
|
125
|
-
"apiKey": "",
|
|
125
|
+
"apiKey": "${input:qwenApiKey}",
|
|
126
126
|
"apiType": "chat-completions",
|
|
127
127
|
"models": [
|
|
128
128
|
{
|
|
129
129
|
"id": "qwen3.8-max",
|
|
130
|
-
"name": "Qwen 3.8 Max
|
|
130
|
+
"name": "Qwen 3.8 Max",
|
|
131
131
|
"url": "http://127.0.0.1:3458/v1/chat/completions",
|
|
132
132
|
"toolCalling": true,
|
|
133
133
|
"vision": true,
|
|
@@ -150,7 +150,7 @@ DashScope is **Pay-as-You-Go only** — but new Model Studio users get **1M inpu
|
|
|
150
150
|
3. Find the **Qwen** group → **Update API Key**.
|
|
151
151
|
4. Paste your DashScope API key.
|
|
152
152
|
|
|
153
|
-
>
|
|
153
|
+
> **`apiKey` must be non-empty** — the file's schema enforces `minLength: 1`, so `"apiKey": ""` shows _String is shorter than the minimum length of 1_. Use the `${input:...}` placeholder shown above and set it through the Language Models UI, which rewrites it to a `${input:chat.lm.secret.<id>}` keychain reference. Keys are region-specific.
|
|
154
154
|
>
|
|
155
155
|
> New keys start with `sk-ws-` and are shown only once, in the **API Quick Access** dialog — copy the key before closing it. Older `sk-` keys keep working.
|
|
156
156
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilot-custom-endpoint",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Local proxies for VS Code Copilot custom endpoints — Kimi K2, Qwen 3.x & MiMo V2.6",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -57,4 +57,4 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"dotenv": "^17.4.2"
|
|
59
59
|
}
|
|
60
|
-
}
|
|
60
|
+
}
|