copilot-custom-endpoint 3.7.1 → 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 +47 -25
- package/docs/example-config.md +89 -63
- package/docs/models/deepseek.md +122 -8
- package/docs/models/glm.md +44 -44
- package/docs/models/kimi.md +15 -6
- package/docs/models/mimo.md +34 -40
- package/docs/models/minimax.md +38 -41
- package/docs/models/qwen.md +35 -30
- package/docs/pricing.md +15 -3
- package/lib/kimi-rewrite.mjs +78 -0
- package/lib/mimo-rewrite.mjs +1 -20
- package/lib/qwen-rewrite.mjs +45 -0
- package/lib/rewrite-summary.mjs +40 -0
- package/package.json +1 -1
- package/proxy/kimi-proxy.mjs +8 -102
- package/proxy/qwen-proxy.mjs +6 -63
package/README.md
CHANGED
|
@@ -13,27 +13,40 @@ If [OpenRouter](https://openrouter.ai) is blocked by your network or too generic
|
|
|
13
13
|
1. **Pick a model** from the table below.
|
|
14
14
|
2. **Add it to your VS Code config** — copy the snippet from the model's doc.
|
|
15
15
|
3. **Set the API key** through VS Code's UI (it goes to your OS keychain, not the file).
|
|
16
|
-
4. **
|
|
16
|
+
4. **Check the utility models (optional)** — with a GitHub Copilot token, VS Code already uses Copilot's built-in utility models. Only if you use BYOK without Copilot sign-in do you need to set **Chat: Utility Model** / **Chat: Utility Small Model** (or point `chat.byokUtilityModelDefault` at _Main Agent Model_).
|
|
17
17
|
5. **Open chat** and pick the model from the model picker.
|
|
18
18
|
|
|
19
19
|
That's it. No code, no servers to manage (unless the model specifically needs the local proxy — the table tells you).
|
|
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
|
|
|
37
|
+
### 0. Know which harness you are on
|
|
38
|
+
|
|
39
|
+
VS Code 1.146 runs chat sessions on one of two harnesses, and custom endpoints behave the same on both in our measurements — but the setup path differs:
|
|
40
|
+
|
|
41
|
+
| Harness | Status | BYOK setup |
|
|
42
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
43
|
+
| **Copilot harness** | Default for new sessions since VS Code 1.143. Custom-endpoint BYOK is an **experimental** route. | Enable `chat.agentHost.byokModels.enabled`, then configure the provider normally. |
|
|
44
|
+
| **Local harness** | Deprecated; [scheduled for removal in February 2027](https://code.visualstudio.com/updates/v1_146#_copilot-harness-and-deprecation-of-the-local-harness). | No extra setting — custom endpoints are picked up directly. |
|
|
45
|
+
|
|
46
|
+
If a model does not appear in the picker on the Copilot harness, check that setting before editing `chatLanguageModels.json`. Details: [harness research](docs/research/vscode-1.146-copilot-harness.md#1-harness-transition).
|
|
47
|
+
|
|
48
|
+
> **The session target resets per chat.** Measured on 1.146: a new chat always starts on the Copilot harness even after a Local session, so pick the target again for every new chat. Changing the _model_ inside a live chat keeps the session — and its history — so switching provider mid-conversation carries the earlier turns across.
|
|
49
|
+
|
|
37
50
|
### 1. Find (or create) your config file
|
|
38
51
|
|
|
39
52
|
| OS | Path |
|
|
@@ -48,29 +61,32 @@ If the file doesn't exist yet, create it with `[]` inside.
|
|
|
48
61
|
|
|
49
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.
|
|
50
63
|
|
|
51
|
-
> **⚠️
|
|
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
|
+
|
|
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
|
+
|
|
68
|
+
> **Name collision hides your models.** If your provider's `name` matches an installed extension's group (for example `GLM`, when the Z.ai extension is installed), the picker merges them and your models sit behind the extension's group. Give the provider a distinct name (`GLM Relay`, `Qwen (proxy)`, …).
|
|
52
69
|
|
|
53
70
|
### 3. Set the API key
|
|
54
71
|
|
|
55
72
|
1. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`).
|
|
56
73
|
2. Run **Chat: Manage Language Models**.
|
|
57
74
|
3. Find your provider in the list, right-click the group name → **Update API Key**.
|
|
58
|
-
4. Paste your key. It's stored in your OS keychain.
|
|
75
|
+
4. Paste your key. It's stored in your OS keychain, and VS Code resolves it into the request's `Authorization` header — the only path that works.
|
|
59
76
|
|
|
60
|
-
### 4.
|
|
77
|
+
### 4. Utility models (usually nothing to do)
|
|
61
78
|
|
|
62
|
-
>
|
|
79
|
+
> **You only need this when running BYOK without GitHub sign-in.** With a Copilot token available, VS Code defaults both utility settings to Copilot's built-in utility models.
|
|
63
80
|
|
|
64
81
|
1. Open VS Code Settings (`Ctrl+,` / `Cmd+,`).
|
|
65
|
-
2.
|
|
66
|
-
3. Pick the **fastest, cheapest model** available to you
|
|
67
|
-
- **GLM 5.3 Flash** — if you have [GLM configured](docs/models/glm.md) (cheapest custom-endpoint option
|
|
68
|
-
- **
|
|
69
|
-
- **MiMo V2.6 Flash** — if you already have Xiaomi MiMo configured (low-cost multimodal option, ~$0.10/session).
|
|
82
|
+
2. Set **Chat: Utility Model** (`chat.utilityModel`) and **Chat: Utility Small Model** (`chat.utilitySmallModel`) — or set `chat.byokUtilityModelDefault` to **Main Agent Model**.
|
|
83
|
+
3. Pick the **fastest, cheapest model** available to you. Good choices:
|
|
84
|
+
- **GLM 5.3 Flash** — if you have [GLM configured](docs/models/glm.md) (cheapest custom-endpoint option).
|
|
85
|
+
- **MiMo V2.6 Flash** — if you already have Xiaomi MiMo configured (low-cost multimodal option).
|
|
70
86
|
- **Default** — if you still have native Copilot model access, this lets VS Code use its built-in fast model.
|
|
71
87
|
4. The setting takes effect immediately — no restart needed.
|
|
72
88
|
|
|
73
|
-
> **Why this matters:**
|
|
89
|
+
> **Why this matters:** utility flows (titles, summaries, intent detection, commit messages, PR descriptions) need a small model. Without a Copilot token and without these settings, those features are unavailable. The [VS Code documentation](https://code.visualstudio.com/docs/agent-customization/language-models#_change-the-model-for-utility-tasks) does not list token counting or prompt truncation among them.
|
|
74
90
|
|
|
75
91
|
### 5. Chat
|
|
76
92
|
|
|
@@ -123,10 +139,14 @@ The current AA values are **Artificial Analysis Intelligence Index v5.0** compos
|
|
|
123
139
|
|
|
124
140
|
**Every pricing cell comes from first-party provider pricing or GitHub Copilot’s official billing table, never OpenRouter.** The Qwen 3.8 Max row scores **33.6** under v5.0, and Qwen Cloud PAYG pricing remains **$2 / $0.25 implicit cache / $6**.
|
|
125
141
|
|
|
126
|
-
This snapshot records Gemini 3.8 Flash, Gemini 4 Argon, Grok 4.7, GPT-6 Sol, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna, Claude Fable 5.2, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 as **Copilot-native** models.
|
|
142
|
+
This snapshot records Gemini 3.8 Flash, Gemini 4 Argon, Gemini 4 Carbon, Grok 4.7, GPT-6 Sol, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna, Claude Fable 5.2, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 as **Copilot-native** models.
|
|
127
143
|
|
|
128
144
|
**GPT-6.1 Terra** (released October 2026, in Copilot since October 26) enters at **51** on flat pricing of **$1 / $0.05 cache read / $5** per 1M tokens with vision and a 1M context, which puts it at **~$0.0196** per intelligence point — about half of GPT-6.1 Sol’s **~$0.0367**. Gemini 4 Argon (released October 13, 2026) scores **50.4** on Google’s introductory pricing of **$2 / $0.10 implicit cache / $10** per 1M tokens, which doubles to **$4 / $0.20 / $20** on December 1, 2026.
|
|
129
145
|
|
|
146
|
+
**Gemini 4 Carbon** (announced October 28, 2026; in Copilot since November 10) scores **60** — second overall behind Claude Fable 5.2 — on the same **$2 / $0.10 / $10** introductory rates as Argon, which also double to **$4 / $0.20 / $20** on December 1. That puts it at **~$0.0333** per intelligence point at roughly **$2.00** per modeled session, but Google notes Carbon spends more tokens per task than Argon, so a real Carbon session costs more at identical rates. Its **60** is Artificial Analysis' current v5.0.1 value; Google's launch post listed **59** under v5.0.
|
|
147
|
+
|
|
148
|
+
**Gemini 4 Hydrogen** (released November 12, 2026) is Google's cheap everyday-execution counterpart to Carbon and Argon, at a flat **$1.50 / $0.075 implicit cache / $7.50** per 1M tokens across the full 1M window — cheaper than Carbon's intro rates and unaffected by the December 1 price step on Argon and Carbon. It scores **54** at its `xhigh` thinking level (**51** at the default `high`), which puts it at **~$0.0278** per intelligence point at roughly **$1.50** per modeled session. It is API-only for now: Google ships it in AI Studio and the Gemini API, including a free tier, but it is not in Copilot, so reaching it means a custom endpoint. Hydrogen always thinks across `low` / `medium` / `high` / `xhigh`, so real token spend tracks the thinking level.
|
|
149
|
+
|
|
130
150
|
Claude Haiku 5.5 (released October 7, 2026) scores **36.2** and, at **~$0.0028** per intelligence point, is still the lowest cost per intelligence in the table; MiMo V2.6 Flash (**26.7**) is still the cheapest custom-endpoint option at **~$0.0037**.
|
|
131
151
|
|
|
132
152
|
Muse Spark 1.3 (Meta, released September 2, 2026) scores **36.4** on Meta Model API pricing of **$1.25 / $0.15 cached input / $4.25** per 1M tokens; its day-one `muse-spark-1.3-contributor` SKU is excluded from this snapshot because Meta may train future models on those prompts and completions.
|
|
@@ -144,7 +164,9 @@ DeepSeek’s **V4.1-Flash-1017** build (released October 17, 2026) scores **32**
|
|
|
144
164
|
| **MiMo V2.6 Pro** | Xiaomi | **~$0.0102** | **29.9** | ~$0.30 | ✅ | 1M |
|
|
145
165
|
| **GPT-6.1 Terra** | OpenAI | **~$0.0196** | **51** | ~$1.00 | ✅ | 1M |
|
|
146
166
|
| **Gemini 3.8 Flash** | Google | **~$0.0246** | **30.5** | ~$0.75 | ✅ | 1M |
|
|
167
|
+
| **Gemini 4 Hydrogen** | Google | **~$0.0278** | **54** | ~$1.50 | ✅ | 1M |
|
|
147
168
|
| **Muse Spark 1.3** | Meta | **~$0.0288** | **36.4** | ~$1.05 | ✅ | 1M |
|
|
169
|
+
| **Gemini 4 Carbon** | Google | **~$0.0333** | **60** | ~$2.00 | ✅ | 1M |
|
|
148
170
|
| **GLM 5.3** | Z.ai | **~$0.0360** | **31.7** | ~$1.14 | ❌ | 1M |
|
|
149
171
|
| **GPT-6.1 Sol** | OpenAI | **~$0.0367** | **54.5** | ~$2.00 | ✅ | 1M |
|
|
150
172
|
| **Claude Sonnet 5.5** | Anthropic | **~$0.0369** | **54.2** | ~$2.00 | ✅ | 1M |
|
|
@@ -160,7 +182,7 @@ DeepSeek’s **V4.1-Flash-1017** build (released October 17, 2026) scores **32**
|
|
|
160
182
|
| **Claude Fable 5.1** | Anthropic | **~$0.2012** | **49.7** | ~$10.00 | ✅ | 1M |
|
|
161
183
|
|
|
162
184
|
> `MiMo V2.6 Pro UltraSpeed` uses the MiMo V2.6 Pro score (same quality, lower latency).
|
|
163
|
-
> Plan access: GPT-6 Sol, GPT-6.1 Sol, Claude Opus 5.5, Claude Fable 5.2, and Gemini 4
|
|
185
|
+
> Plan access: GPT-6 Sol, GPT-6.1 Sol, Claude Opus 5.5, Claude Fable 5.2, Gemini 4 Argon, and Gemini 4 Carbon need Pro+ or higher; GPT-6 Luna and Claude Sonnet 5.5 are available from Pro; Claude Haiku 5.5 is on every paid plan.
|
|
164
186
|
> Claude Haiku 5.5 is priced by prompt length; the table shows its sub-100K rates.
|
|
165
187
|
|
|
166
188
|
> Detailed pricing, benchmark provenance, and model-specific notes live in [docs/pricing.md](docs/pricing.md) and [docs/benchmarks.md](docs/benchmarks.md). This page stays focused on setup and model selection. For a copy-paste config containing **all providers at once**, see [docs/example-config.md](docs/example-config.md).
|
|
@@ -210,7 +232,7 @@ VS Code's built-in `view_image` tool only accepts **static images** (PNG, JPG, G
|
|
|
210
232
|
2. If the provider needs request rewriting, add a proxy under `proxy/`.
|
|
211
233
|
3. Submit a PR.
|
|
212
234
|
|
|
213
|
-
The current AA values are **Artificial Analysis Intelligence Index v5.0** composites taken from OpenRouter’s model metadata (re-based from v4.3.2 on October 31, 2026); **every pricing cell comes from first-party provider pricing or GitHub Copilot’s official billing table, never OpenRouter.** Qwen Cloud PAYG pricing remains **$2 / $0.25 implicit cache / $6** for Qwen3.8 Max; its separate Token Plan is not the PAYG rate table. This snapshot records Gemini 3.8 Flash, Gemini 4 Argon, Grok 4.7, GPT-6 Sol, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna, Claude Fable 5.2, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 as **Copilot-native** models.
|
|
235
|
+
The current AA values are **Artificial Analysis Intelligence Index v5.0** composites taken from OpenRouter’s model metadata (re-based from v4.3.2 on October 31, 2026); **every pricing cell comes from first-party provider pricing or GitHub Copilot’s official billing table, never OpenRouter.** Qwen Cloud PAYG pricing remains **$2 / $0.25 implicit cache / $6** for Qwen3.8 Max; its separate Token Plan is not the PAYG rate table. This snapshot records Gemini 3.8 Flash, Gemini 4 Argon, Gemini 4 Carbon, Grok 4.7, GPT-6 Sol, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna, Claude Fable 5.2, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5 as **Copilot-native** models.
|
|
214
236
|
|
|
215
237
|
- **Chat only.** Inline completions, semantic search, and next-edit suggestions still need a GitHub-hosted model.
|
|
216
238
|
- Each proxy is tuned for a specific provider family. Don't point the Kimi proxy at an arbitrary OpenAI-compatible endpoint.
|
package/docs/example-config.md
CHANGED
|
@@ -2,28 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
Here's a complete, real-world `chatLanguageModels.json` that combines **the `customendpoint` providers from the live `chatLanguageModels.json`**, plus the additional GLM models (`glm-5.3-flash`, `glm-5.3`, `glm-5.2`, `glm-5.1`) that are validated in [docs/models/glm.md](models/glm.md) but not present in every live config. Copy what you need, leave the rest out.
|
|
4
4
|
|
|
5
|
-
> **⚠️
|
|
6
|
-
|
|
7
|
-
> **
|
|
8
|
-
|
|
9
|
-
>
|
|
5
|
+
> **⚠️ Measured on VS Code 1.146 (both harnesses):** `modelOptions` is forwarded to the provider; **`requestBody` is silently dropped**. Provider-specific objects such as `thinking`, `reasoning_split`, `enable_thinking`, and `max_tokens` therefore cannot be set from this file — route those models through their proxy, or accept the provider defaults. See [the harness research](research/vscode-1.146-copilot-harness.md).
|
|
6
|
+
|
|
7
|
+
> **Harness check:** on the Copilot harness, custom-endpoint BYOK is experimental and requires `chat.agentHost.byokModels.enabled`; the Local harness is deprecated (removal planned February 2027) and needs no extra setting. See [README § Setup #0](../README.md#0-know-which-harness-you-are-on).
|
|
8
|
+
|
|
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
|
+
|
|
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
|
+
|
|
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
|
+
|
|
15
|
+
> **Note:** The live config points Qwen at the local proxy (`:3458`) and MiMo at the local proxy (`:3459`). The proxies manage thinking dynamically, so no thinking-related configuration belongs in this file.
|
|
10
16
|
|
|
11
17
|
```json
|
|
12
18
|
[
|
|
13
19
|
{
|
|
14
20
|
"name": "Qwen",
|
|
15
21
|
"vendor": "customendpoint",
|
|
16
|
-
"apiKey": "",
|
|
22
|
+
"apiKey": "${input:qwenApiKey}",
|
|
17
23
|
"apiType": "chat-completions",
|
|
18
24
|
"models": [
|
|
19
25
|
{
|
|
20
26
|
"id": "qwen3.8-max",
|
|
21
|
-
"name": "Qwen 3.8 Max
|
|
27
|
+
"name": "Qwen 3.8 Max",
|
|
22
28
|
"url": "http://127.0.0.1:3458/v1/chat/completions",
|
|
23
29
|
"toolCalling": true,
|
|
24
30
|
"vision": true,
|
|
25
31
|
"streaming": true,
|
|
26
|
-
"maxInputTokens":
|
|
32
|
+
"maxInputTokens": 868928,
|
|
27
33
|
"maxOutputTokens": 131072
|
|
28
34
|
}
|
|
29
35
|
]
|
|
@@ -31,21 +37,21 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
31
37
|
{
|
|
32
38
|
"name": "Kimi",
|
|
33
39
|
"vendor": "customendpoint",
|
|
34
|
-
"apiKey": "",
|
|
40
|
+
"apiKey": "${input:kimiApiKey}",
|
|
35
41
|
"apiType": "chat-completions",
|
|
36
42
|
"models": [
|
|
37
43
|
{
|
|
38
44
|
"id": "kimi-k3.1-pro",
|
|
39
|
-
"name": "Kimi K3.1 Pro
|
|
45
|
+
"name": "Kimi K3.1 Pro",
|
|
40
46
|
"url": "http://127.0.0.1:3457/v1/chat/completions",
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
"modelOptions": { "temperature": 1 },
|
|
48
|
+
"supportsReasoningEffort": ["low", "high", "max"],
|
|
49
|
+
"reasoningEffortFormat": "chat-completions",
|
|
50
|
+
"thinking": true,
|
|
45
51
|
"toolCalling": true,
|
|
46
52
|
"vision": true,
|
|
47
53
|
"streaming": true,
|
|
48
|
-
"maxInputTokens":
|
|
54
|
+
"maxInputTokens": 917504,
|
|
49
55
|
"maxOutputTokens": 131072
|
|
50
56
|
}
|
|
51
57
|
]
|
|
@@ -53,7 +59,7 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
53
59
|
{
|
|
54
60
|
"name": "MiMo",
|
|
55
61
|
"vendor": "customendpoint",
|
|
56
|
-
"apiKey": "",
|
|
62
|
+
"apiKey": "${input:mimoApiKey}",
|
|
57
63
|
"apiType": "chat-completions",
|
|
58
64
|
"models": [
|
|
59
65
|
{
|
|
@@ -63,12 +69,9 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
63
69
|
"toolCalling": true,
|
|
64
70
|
"vision": true,
|
|
65
71
|
"streaming": true,
|
|
66
|
-
"maxInputTokens":
|
|
72
|
+
"maxInputTokens": 917504,
|
|
67
73
|
"maxOutputTokens": 131072,
|
|
68
|
-
"
|
|
69
|
-
"temperature": 1,
|
|
70
|
-
"top_p": 0.95
|
|
71
|
-
}
|
|
74
|
+
"modelOptions": { "temperature": 1, "top_p": 0.95 }
|
|
72
75
|
},
|
|
73
76
|
{
|
|
74
77
|
"id": "mimo-v2.6-flash",
|
|
@@ -77,12 +80,9 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
77
80
|
"toolCalling": true,
|
|
78
81
|
"vision": true,
|
|
79
82
|
"streaming": true,
|
|
80
|
-
"maxInputTokens":
|
|
83
|
+
"maxInputTokens": 917504,
|
|
81
84
|
"maxOutputTokens": 131072,
|
|
82
|
-
"
|
|
83
|
-
"temperature": 1,
|
|
84
|
-
"top_p": 0.95
|
|
85
|
-
}
|
|
85
|
+
"modelOptions": { "temperature": 1, "top_p": 0.95 }
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"id": "mimo-v2.6-pro-ultraspeed",
|
|
@@ -91,61 +91,53 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
91
91
|
"toolCalling": true,
|
|
92
92
|
"vision": true,
|
|
93
93
|
"streaming": true,
|
|
94
|
-
"maxInputTokens":
|
|
94
|
+
"maxInputTokens": 917504,
|
|
95
95
|
"maxOutputTokens": 131072,
|
|
96
|
-
"
|
|
97
|
-
"temperature": 1,
|
|
98
|
-
"top_p": 0.95
|
|
99
|
-
}
|
|
96
|
+
"modelOptions": { "temperature": 1, "top_p": 0.95 }
|
|
100
97
|
}
|
|
101
98
|
]
|
|
102
99
|
},
|
|
103
100
|
{
|
|
104
101
|
"name": "MiniMax",
|
|
105
102
|
"vendor": "customendpoint",
|
|
106
|
-
"apiKey": "",
|
|
103
|
+
"apiKey": "${input:minimaxApiKey}",
|
|
107
104
|
"apiType": "chat-completions",
|
|
108
105
|
"models": [
|
|
109
106
|
{
|
|
110
107
|
"id": "MiniMax-M3.1-Flash",
|
|
111
|
-
"name": "MiniMax M3.1 Flash
|
|
108
|
+
"name": "MiniMax M3.1 Flash",
|
|
112
109
|
"url": "https://api.minimax.io/v1/chat/completions",
|
|
113
110
|
"toolCalling": true,
|
|
114
111
|
"vision": true,
|
|
115
112
|
"streaming": true,
|
|
116
|
-
"maxInputTokens":
|
|
113
|
+
"maxInputTokens": 868928,
|
|
117
114
|
"maxOutputTokens": 131072,
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"temperature": 1,
|
|
123
|
-
"top_p": 0.95
|
|
124
|
-
}
|
|
115
|
+
"modelOptions": { "temperature": 1, "top_p": 0.95 },
|
|
116
|
+
"supportsReasoningEffort": ["low", "medium", "high", "xhigh", "max"],
|
|
117
|
+
"reasoningEffortFormat": "chat-completions",
|
|
118
|
+
"thinking": true
|
|
125
119
|
}
|
|
126
120
|
]
|
|
127
121
|
},
|
|
128
122
|
{
|
|
129
123
|
"name": "GLM",
|
|
130
124
|
"vendor": "customendpoint",
|
|
131
|
-
"apiKey": "",
|
|
125
|
+
"apiKey": "${input:glmApiKey}",
|
|
132
126
|
"apiType": "chat-completions",
|
|
133
127
|
"models": [
|
|
134
128
|
{
|
|
135
129
|
"id": "glm-5.3-flash",
|
|
136
|
-
"name": "GLM 5.3 Flash
|
|
130
|
+
"name": "GLM 5.3 Flash",
|
|
137
131
|
"url": "https://api.z.ai/api/paas/v4/chat/completions",
|
|
138
132
|
"toolCalling": true,
|
|
139
133
|
"vision": true,
|
|
140
134
|
"streaming": true,
|
|
141
|
-
"maxInputTokens":
|
|
135
|
+
"maxInputTokens": 917504,
|
|
142
136
|
"maxOutputTokens": 131072,
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
"top_p": 0.95
|
|
148
|
-
}
|
|
137
|
+
"modelOptions": { "temperature": 1, "top_p": 0.95 },
|
|
138
|
+
"supportsReasoningEffort": ["low", "high", "max"],
|
|
139
|
+
"reasoningEffortFormat": "chat-completions",
|
|
140
|
+
"thinking": true
|
|
149
141
|
},
|
|
150
142
|
{
|
|
151
143
|
"id": "glm-5.3",
|
|
@@ -154,14 +146,34 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
154
146
|
"toolCalling": true,
|
|
155
147
|
"vision": false,
|
|
156
148
|
"streaming": true,
|
|
157
|
-
"maxInputTokens":
|
|
149
|
+
"maxInputTokens": 917504,
|
|
150
|
+
"maxOutputTokens": 131072,
|
|
151
|
+
"modelOptions": { "temperature": 1, "top_p": 0.95 },
|
|
152
|
+
"supportsReasoningEffort": ["low", "high", "max"],
|
|
153
|
+
"reasoningEffortFormat": "chat-completions",
|
|
154
|
+
"thinking": true
|
|
155
|
+
}
|
|
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,
|
|
158
172
|
"maxOutputTokens": 131072,
|
|
159
|
-
"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
"top_p": 0.95
|
|
164
|
-
}
|
|
173
|
+
"modelOptions": { "temperature": 1, "top_p": 0.95 },
|
|
174
|
+
"supportsReasoningEffort": ["low", "high", "max"],
|
|
175
|
+
"reasoningEffortFormat": "chat-completions",
|
|
176
|
+
"thinking": true
|
|
165
177
|
}
|
|
166
178
|
]
|
|
167
179
|
}
|
|
@@ -170,12 +182,26 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
170
182
|
|
|
171
183
|
## Per-model snippets
|
|
172
184
|
|
|
185
|
+
> **Context limits follow one rule:** VS Code treats `maxInputTokens + maxOutputTokens` as the model's total context window, and the sum must not exceed the provider's advertised window. Every entry above therefore declares `maxInputTokens = window − maxOutputTokens`:
|
|
186
|
+
>
|
|
187
|
+
> | Model | Window (provider) | `maxOutputTokens` | `maxInputTokens` |
|
|
188
|
+
> | -------------------------- | ----------------- | ----------------- | ---------------- |
|
|
189
|
+
> | `qwen3.8-max` | 1,000,000 | 131,072 | 868,928 |
|
|
190
|
+
> | `kimi-k3.1-pro` | 1,048,576 | 131,072 | 917,504 |
|
|
191
|
+
> | `mimo-v2.6-*` | 1,048,576 | 131,072 | 917,504 |
|
|
192
|
+
> | `MiniMax-M3.1-Flash` | 1,000,000 | 131,072 | 868,928 |
|
|
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 |
|
|
195
|
+
>
|
|
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).
|
|
197
|
+
|
|
173
198
|
If you only need one provider, jump straight to its setup guide:
|
|
174
199
|
|
|
175
|
-
- [Kimi K3.1 Pro / K2.6 / K2.7 Code](kimi.md)
|
|
176
|
-
- [Qwen 3.8 Max](qwen.md)
|
|
177
|
-
- [Xiaomi MiMo (V2.6 Pro / Flash / Pro UltraSpeed)](mimo.md)
|
|
178
|
-
- [MiniMax M3.1 Flash](minimax.md)
|
|
179
|
-
- [GLM (5.3 Flash / 5.3 / 5.2 / 5.1)](glm.md)
|
|
200
|
+
- [Kimi K3.1 Pro / K2.6 / K2.7 Code](models/kimi.md)
|
|
201
|
+
- [Qwen 3.8 Max](models/qwen.md)
|
|
202
|
+
- [Xiaomi MiMo (V2.6 Pro / Flash / Pro UltraSpeed)](models/mimo.md)
|
|
203
|
+
- [MiniMax M3.1 Flash](models/minimax.md)
|
|
204
|
+
- [GLM (5.3 Flash / 5.3 / 5.2 / 5.1)](models/glm.md)
|
|
205
|
+
- [DeepSeek V4.1 Flash](models/deepseek.md)
|
|
180
206
|
|
|
181
|
-
> **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.
|