copilot-custom-endpoint 1.7.4 → 1.8.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 CHANGED
@@ -8,12 +8,13 @@ VS Code lets you add your own language-model endpoint via a small JSON config fi
8
8
 
9
9
  If [OpenRouter](https://openrouter.ai) is blocked by your network or too generic for your model's quirks, this is the workaround.
10
10
 
11
- ## How it works (4 steps)
11
+ ## How it works (5 steps)
12
12
 
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. **Open chat** and pick the model from the model picker.
16
+ 4. **Configure the Utility Small Model** — VS Code now requires a fast fallback model for built-in utility flows. Open Settings → search **"Chat: Utility Small Model"** → pick your fastest custom-endpoint model (or "Default" if you have native Copilot models available). Without this, chat may not function correctly.
17
+ 5. **Open chat** and pick the model from the model picker.
17
18
 
18
19
  That's it. No code, no servers to manage (unless the model specifically needs the local proxy — the table tells you).
19
20
 
@@ -58,7 +59,21 @@ Open the setup guide for the model you picked (links in the table above) and cop
58
59
  3. Find your provider in the list, right-click the group name → **Update API Key**.
59
60
  4. Paste your key. It's stored in your OS keychain.
60
61
 
61
- ### 4. Chat
62
+ ### 4. Configure the Utility Small Model
63
+
64
+ > **⚠️ Required for BYOK/custom-endpoint users.** VS Code's latest update mandates that you explicitly set which model handles built-in small/fast utility flows. Without this, custom-endpoint models may not function correctly in chat or agent mode.
65
+
66
+ 1. Open VS Code Settings (`Ctrl+,` / `Cmd+,`).
67
+ 2. Search for **"Chat: Utility Small Model"** (setting ID: `chat.lm.utilitySmallModel`).
68
+ 3. Pick the **fastest, cheapest model** available to you from the dropdown. Good choices:
69
+ - **DeepSeek V4 Flash** — if you have the [DeepSeek V4 for Copilot Chat](https://marketplace.visualstudio.com/items?itemName=Vizards.deepseek-v4-for-copilot) extension installed (fastest, ~$0.10/session).
70
+ - **MiMo V2.5** — if you already have Xiaomi MiMo configured (cheapest custom-endpoint option, ~$0.10/session).
71
+ - **Default** — if you still have native Copilot model access, this lets VS Code use its built-in fast model.
72
+ 4. The setting takes effect immediately — no restart needed.
73
+
74
+ > **Why this matters:** VS Code uses a small utility model for quick background tasks (token counting, prompt truncation, lightweight completions). When you switch to custom-endpoint models, the framework still needs a fast model for these utility flows. If left unset, some features may silently degrade or fail.
75
+
76
+ ### 5. Chat
62
77
 
63
78
  - Open Copilot chat (`Ctrl+Alt+I` / `Cmd+Ctrl+I`).
64
79
  - Click the model picker (top-right).
@@ -2,6 +2,8 @@
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.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
+ > **⚠️ Reminder:** After adding models, you must also configure the **Utility Small Model** setting in VS Code. Open Settings → search **"Chat: Utility Small Model"** → pick your fastest model (e.g., DeepSeek V4 Flash or MiMo V2.5). Without this, custom-endpoint models may not function correctly. See the [main README](../README.md#4-configure-the-utility-small-model) for details.
6
+ >
5
7
  > **Note:** The `apiKey` fields are left as empty strings — set them via the **Chat: Manage Language Models** UI (Command Palette → right-click provider group → **Update API Key**). After you set a key via the UI, VS Code replaces the empty string with a `${input:chat.lm.secret.<id>}` secret reference.
6
8
  >
7
9
  > The live config points Qwen at the local proxy (`:3458`) and MiMo at the local proxy (`:3459`). When using a proxy, align the model `requestBody` overrides with the proxy's behavior: Qwen sends no `requestBody` (the proxy manages `enable_thinking` dynamically); MiMo sends only `temperature` and `top_p` (the proxy injects `thinking: {"type": "disabled"}` on tool turns and leaves it absent on plain chat).
@@ -124,23 +126,6 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
124
126
  "temperature": 1,
125
127
  "top_p": 0.95
126
128
  }
127
- },
128
- {
129
- "id": "MiniMax-M3-Priority",
130
- "name": "MiniMax M3 (Priority)",
131
- "url": "https://api.minimax.io/v1/chat/completions",
132
- "toolCalling": true,
133
- "vision": true,
134
- "streaming": true,
135
- "maxInputTokens": 1048576,
136
- "maxOutputTokens": 131072,
137
- "requestBody": {
138
- "thinking": { "type": "adaptive" },
139
- "reasoning_split": true,
140
- "temperature": 1,
141
- "top_p": 0.95,
142
- "service_tier": "priority"
143
- }
144
129
  }
145
130
  ]
146
131
  },
@@ -43,7 +43,8 @@
43
43
  2. **Generate an API key** on the API Keys page of the platform.
44
44
  3. **Edit `chatLanguageModels.json`** — add the GLM block below.
45
45
  4. **Set the API key** via Command Palette → **Chat: Manage Language Models** → right-click **GLM** → **Update API Key**.
46
- 5. **Restart VS Code** and select a GLM model from the picker.
46
+ 5. **Configure the Utility Small Model** — Open Settings → search **"Chat: Utility Small Model"** → pick your fastest model (e.g., DeepSeek V4 Flash or MiMo V2.5). [Why?](../../README.md#4-configure-the-utility-small-model)
47
+ 6. **Restart VS Code** and select a GLM model from the picker.
47
48
 
48
49
  ## Setup
49
50
 
@@ -32,7 +32,8 @@
32
32
  1. **Start the proxy** — `npm run proxy:kimi` (or `npx copilot-custom-endpoint kimi` standalone).
33
33
  2. **Edit `chatLanguageModels.json`** — add the Kimi block below.
34
34
  3. **Set your Moonshot API key** via Command Palette → **Chat: Manage Language Models**.
35
- 4. **Restart VS Code** and pick "Kimi K2.6" or "Kimi K2.7 Code".
35
+ 4. **Configure the Utility Small Model** — Open Settings → search **"Chat: Utility Small Model"** → pick your fastest model (e.g., DeepSeek V4 Flash or MiMo V2.5). [Why?](../../README.md#4-configure-the-utility-small-model)
36
+ 5. **Restart VS Code** and pick "Kimi K2.6" or "Kimi K2.7 Code".
36
37
 
37
38
  ## Setup
38
39
 
@@ -57,7 +57,8 @@ Simplest no-proxy approach — but thinking is always off, so you never see mode
57
57
 
58
58
  1. **Edit `chatLanguageModels.json`** — add the MiMo block(s) below.
59
59
  2. **Set your `MIMO_API_KEY`** via Command Palette → **Chat: Manage Language Models**.
60
- 3. **Restart VS Code** and pick "MiMo V2.5 Pro" or "MiMo V2.5".
60
+ 3. **Configure the Utility Small Model** — Open Settings → search **"Chat: Utility Small Model"** → pick your fastest model (e.g., DeepSeek V4 Flash or MiMo V2.5). [Why?](../../README.md#4-configure-the-utility-small-model)
61
+ 4. **Restart VS Code** and pick "MiMo V2.5 Pro" or "MiMo V2.5".
61
62
 
62
63
  ### Alternative: With optional proxy (dynamic thinking)
63
64
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **TL;DR:** MiniMax-M3 works directly — no proxy needed. Use `thinking: { type: "adaptive" }` + `reasoning_split: true` in `requestBody` so the model can reason and the response arrives in a clean OpenAI format (`reasoning_details` field, separate from `content`). **Important:** `thinking: { type: "disabled" }` is **not** a hard override — the model still reasons internally and emits `<think>` tags / `reasoning_content` regardless.
4
4
  >
5
- > Want faster responses and fewer admission failures during peak hours? Add `"service_tier": "priority"` to `requestBody` (or register a second `MiniMax-M3-Priority` picker entry) — same model, **1.5× cost** for **priority admission**. See [M3 Priority tier](#4-m3-priority-tier-optional) below.
5
+ > Want faster responses and fewer admission failures during peak hours? Add `"service_tier": "priority"` to the single `MiniMax-M3` entry's `requestBody` — same model, **1.5× cost** for **priority admission**. (You can only toggle `service_tier` on the existing entry; registering a second picker entry with a different `id` is not valid on the custom-endpoint path because VS Code forwards the `id` as the upstream `model` parameter.) See [M3 Priority tier](#4-m3-priority-tier-optional) below.
6
6
  >
7
7
  > The same `url`, `model id`, and `requestBody` work for **both** Pay-as-You-Go (account-balance billing) and Token Plan (monthly/annual subscription) — only the API key in the secret field changes.
8
8
  >
@@ -38,7 +38,8 @@
38
38
 
39
39
  1. **Edit `chatLanguageModels.json`** — add the MiniMax block below.
40
40
  2. **Set your `MINIMAX_API_KEY`** via Command Palette → **Chat: Manage Language Models**.
41
- 3. **Restart VS Code** and pick "MiniMax M3" in the chat picker.
41
+ 3. **Configure the Utility Small Model** — Open Settings → search **"Chat: Utility Small Model"** → pick your fastest model (e.g., DeepSeek V4 Flash or MiMo V2.5). [Why?](../../README.md#4-configure-the-utility-small-model)
42
+ 4. **Restart VS Code** and pick "MiniMax M3" in the chat picker.
42
43
 
43
44
  ## Setup
44
45
 
@@ -124,55 +125,33 @@ When the Token Plan 5-hour or weekly quota is exhausted, the request fails with
124
125
 
125
126
  MiniMax exposes M3 with a per-request **`service_tier`** switch that promotes the request into MiniMax's priority admission queue. Priority is **not** a separate model — it is the same `MiniMax-M3` weights invoked with `"service_tier": "priority"` in the request body, costing **1.5× Standard** in exchange for **priority admission** (faster responses, fewer failures during MiniMax peak hours — typically 15:00–17:30 weekdays). Capabilities, context window (1M, guaranteed 512K), vision, tool calling, rate limits (200 RPM / 10M TPM), and thinking modes are identical to Standard.
126
127
 
127
- To add a separate Priority entry to your picker, add a second model block to the same `MiniMax` group with a distinct `id` and `name`, and set `"service_tier": "priority"` in `requestBody`:
128
+ **You can only toggle `service_tier` by editing the single `MiniMax-M3` entry.** VS Code's built-in custom-endpoint handler forwards the model block's `id` field as the upstream `model` parameter, and `MiniMax-M3` is the only valid MiniMax M3 model id on the upstream API. Adding a second model block with a different `id` (such as `MiniMax-M3-Priority`) is **not valid** — the upstream API will reject the unknown model. Duplicating the `MiniMax-M3` id twice is also invalid and causes VS Code picker bugs.
129
+
130
+ To switch the existing entry from Standard to Priority, add one line to `requestBody`:
128
131
 
129
132
  ```json
130
133
  {
131
- "name": "MiniMax",
132
- "vendor": "customendpoint",
133
- "apiKey": "",
134
- "apiType": "chat-completions",
135
- "models": [
136
- {
137
- "id": "MiniMax-M3",
138
- "name": "MiniMax M3 (Standard)",
139
- "url": "https://api.minimax.io/v1/chat/completions",
140
- "toolCalling": true,
141
- "vision": true,
142
- "streaming": true,
143
- "maxInputTokens": 1048576,
144
- "maxOutputTokens": 131072,
145
- "requestBody": {
146
- "thinking": { "type": "adaptive" },
147
- "reasoning_split": true,
148
- "temperature": 1,
149
- "top_p": 0.95
150
- }
151
- },
152
- {
153
- "id": "MiniMax-M3-Priority",
154
- "name": "MiniMax M3 (Priority)",
155
- "url": "https://api.minimax.io/v1/chat/completions",
156
- "toolCalling": true,
157
- "vision": true,
158
- "streaming": true,
159
- "maxInputTokens": 1048576,
160
- "maxOutputTokens": 131072,
161
- "requestBody": {
162
- "thinking": { "type": "adaptive" },
163
- "reasoning_split": true,
164
- "temperature": 1,
165
- "top_p": 0.95,
166
- "service_tier": "priority"
167
- }
168
- }
169
- ]
134
+ "id": "MiniMax-M3",
135
+ "name": "MiniMax M3 (Priority)",
136
+ "url": "https://api.minimax.io/v1/chat/completions",
137
+ "toolCalling": true,
138
+ "vision": true,
139
+ "streaming": true,
140
+ "maxInputTokens": 1048576,
141
+ "maxOutputTokens": 131072,
142
+ "requestBody": {
143
+ "thinking": { "type": "adaptive" },
144
+ "reasoning_split": true,
145
+ "temperature": 1,
146
+ "top_p": 0.95,
147
+ "service_tier": "priority"
148
+ }
170
149
  }
171
150
  ```
172
151
 
173
- Or, if you only ever want Priority, add `"service_tier": "priority"` to the single `MiniMax-M3` entry from step 1.
152
+ To go back to Standard, remove the `"service_tier": "priority"` line (the API default is `standard`). The `name` field is a local VS Code picker label, so it can be changed freely to reflect the current tier.
174
153
 
175
- > The `id` field is purely a VS Code picker identifier — VS Code does not forward it to MiniMax. Both entries hit the same `MiniMax-M3` model; the suffix is a local label. The `service_tier` parameter is supported on **both** the OpenAI-compatible and Anthropic-compatible endpoints.
154
+ > The `service_tier` parameter is supported on **both** the OpenAI-compatible and Anthropic-compatible endpoints. The third-party `klarkxy/minimax-vscode` extension surfaces the Standard/Priority toggle as a separate picker entry because it is a native `LanguageModelChatProvider` that hard-codes the upstream model id internally and rewrites the picker id — that override mechanism is not available to the built-in custom-endpoint path.
176
155
 
177
156
  For the full breakdown (effective pricing, session cost, when Priority is worth the 50% premium), see [docs/research/minimax-m3-priority.md](../research/minimax-m3-priority.md).
178
157
 
@@ -34,13 +34,15 @@
34
34
  1. **Start the proxy:** `npm run proxy:qwen` (or `npx copilot-custom-endpoint qwen`).
35
35
  2. **Use the proxy-path JSON snippet** below.
36
36
  3. **Set your DashScope API key** via Command Palette → **Chat: Manage Language Models**.
37
- 4. **Restart VS Code.** Reasoning will be visible in plain chat and suppressed on tool turns.
37
+ 4. **Configure the Utility Small Model** — Open Settings → search **"Chat: Utility Small Model"** → pick your fastest model (e.g., DeepSeek V4 Flash or MiMo V2.5). [Why?](../../README.md#4-configure-the-utility-small-model)
38
+ 5. **Restart VS Code.** Reasoning will be visible in plain chat and suppressed on tool turns.
38
39
 
39
40
  ### Direct (no proxy)
40
41
 
41
42
  1. **Use the direct-path JSON snippet** below.
42
43
  2. **Set your `DASHSCOPE_API_KEY`** via Command Palette → **Chat: Manage Language Models**.
43
- 3. **Restart VS Code** and pick "Qwen 3.7 Plus" or "Qwen 3.7 Max".
44
+ 3. **Configure the Utility Small Model** — Open Settings → search **"Chat: Utility Small Model"** → pick your fastest model (e.g., DeepSeek V4 Flash or MiMo V2.5). [Why?](../../README.md#4-configure-the-utility-small-model)
45
+ 4. **Restart VS Code** and pick "Qwen 3.7 Plus" or "Qwen 3.7 Max".
44
46
 
45
47
  ## Setup
46
48
 
package/docs/pricing.md CHANGED
@@ -58,7 +58,7 @@ All models are listed together below, sorted by Cost per intelligence ascending
58
58
 
59
59
  ⁴ GLM 5.2 is Z.ai's newly released flagship model (Opus-level intelligence / 1M Solid context). AA Intelligence Index score (**51.0**) and pricing of **$1.40** (input), **$0.26** (cached), and **$4.40** (output) per 1M tokens confirmed on its [model page](https://artificialanalysis.ai/models/glm-5-2). Session cost is identical to GLM 5.1 (~$1.14).
60
60
 
61
- ⁵ **MiniMax M3 Priority** is not a separate model — it is the same `MiniMax-M3` weights invoked with `"service_tier": "priority"` in the request body. Priority costs **1.5× Standard** across input, output, and cache reads (list prices shown above; effective rates after the standing 50% off are $0.45/$1.80/$0.09 ≤512K and $0.90/$3.60/$0.18 >512K), in exchange for **priority admission** (faster responses, fewer failures during MiniMax peak hours — typically 15:00–17:30 weekdays). Capabilities, context window (1M, guaranteed 512K), vision, tool calling, rate limits (200 RPM / 10M TPM), and thinking modes are identical to Standard. To enable it on a custom-endpoint entry, add `"service_tier": "priority"` to `requestBody`. See [docs/research/minimax-m3-priority.md](research/minimax-m3-priority.md) for the full breakdown.
61
+ ⁵ **MiniMax M3 Priority** is not a separate model — it is the same `MiniMax-M3` weights invoked with `"service_tier": "priority"` in the request body. Priority costs **1.5× Standard** across input, output, and cache reads (list prices shown above; effective rates after the standing 50% off are $0.45/$1.80/$0.09 ≤512K and $0.90/$3.60/$0.18 >512K), in exchange for **priority admission** (faster responses, fewer failures during MiniMax peak hours — typically 15:00–17:30 weekdays). Capabilities, context window (1M, guaranteed 512K), vision, tool calling, rate limits (200 RPM / 10M TPM), and thinking modes are identical to Standard. To enable it on the custom-endpoint entry, add `"service_tier": "priority"` to the `requestBody` of the single `MiniMax-M3` block (and remove it to go back to Standard). See [docs/models/minimax.md](models/minimax.md#4-m3-priority-tier-optional) and [docs/research/minimax-m3-priority.md](research/minimax-m3-priority.md) for the full breakdown.
62
62
 
63
63
  ⁶ **Claude Sonnet 5** has introductory pricing of **$2.00 / $0.20 / $10.00** (input / cached / output) through **August 31, 2026**, after which the standard pricing of $3.00 / $0.30 / $15.00 shown above takes effect. See [Anthropic's pricing page](https://claude.com/pricing) for the latest.
64
64
 
@@ -76,12 +76,11 @@ Cost per intelligence = estimated session cost ÷ Intelligence Index score. Sess
76
76
  > - **Kimi K2.6** pricing is from the **Moonshot platform** (direct). Via DashScope: $0.89 input / $3.71 output.
77
77
  > - **DashScope** offers a **free quota** of 1M input + 1M output tokens per model, valid for 90 days.
78
78
  > - **MiniMax M3** uses **tiered pricing** — input price doubles above 512K input tokens. Cache hits are priced at 20% of the input rate ($0.12/M ≤512K, $0.24/M >512K). A **permanent 50% off** discount applies to all MiniMax-M3 pay-as-you-go usage (Standard and Priority tiers), making the effective rates half the list prices above.
79
-
80
- - **MiniMax M3 Priority** is not a separate model — it is the same `MiniMax-M3` weights invoked with `"service_tier": "priority"` in the request body. Priority costs **1.5× Standard** across input, output, and cache reads, in exchange for **priority admission** (faster responses, fewer failures during MiniMax peak hours — typically 15:00–17:30 weekdays). Capabilities, context window (1M, guaranteed 512K), vision, tool calling, rate limits (200 RPM / 10M TPM), and thinking modes are identical to Standard. See [docs/research/minimax-m3-priority.md](research/minimax-m3-priority.md) for the full breakdown.
81
- > - **GLM** models support prompt caching — cache hits are priced at $0.24/M for 5V Turbo and $0.26/M for 5.1.
82
- > - **MiMo** offers a **Token Plan** subscription model with discounted rates and a free cache-writing promotion.
83
- > - **MAI-Code-1-Flash** is a continuously improving model — performance and behavior may evolve over time as new checkpoints are released.
84
- > - For typical Copilot chat usage (short-to-medium prompts), you'll almost always fall in the lowest pricing tier.
79
+ > - **MiniMax M3 Priority** is not a separate model — it is the same `MiniMax-M3` weights invoked with `"service_tier": "priority"` in the request body. Priority costs **1.5× Standard** across input, output, and cache reads, in exchange for **priority admission** (faster responses, fewer failures during MiniMax peak hours — typically 15:00–17:30 weekdays). Capabilities, context window (1M, guaranteed 512K), vision, tool calling, rate limits (200 RPM / 10M TPM), and thinking modes are identical to Standard. See [docs/research/minimax-m3-priority.md](research/minimax-m3-priority.md) for the full breakdown.
80
+ > - **GLM** models support prompt caching — cache hits are priced at $0.24/M for 5V Turbo and $0.26/M for 5.1.
81
+ > - **MiMo** offers a **Token Plan** subscription model with discounted rates and a free cache-writing promotion.
82
+ > - **MAI-Code-1-Flash** is a continuously improving model — performance and behavior may evolve over time as new checkpoints are released.
83
+ > - For typical Copilot chat usage (short-to-medium prompts), you'll almost always fall in the lowest pricing tier.
85
84
 
86
85
  > **How long does 7,000 credits last?** A Pro+ subscriber running 50-turn sessions could afford roughly **13 GPT-5.5 sessions**, **23 Opus sessions**, or **212 Raptor mini sessions** per month — or mix and match. (Multiply session cost by 100 to convert to AI credits.)
87
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilot-custom-endpoint",
3
- "version": "1.7.4",
3
+ "version": "1.8.0",
4
4
  "description": "Local proxies for VS Code Copilot custom endpoints — Kimi K2, Qwen 3.x & MiMo V2.5",
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
+ }