copilot-custom-endpoint 3.7.0 → 4.0.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.
@@ -9,7 +9,7 @@
9
9
  | **Recommended method** | **`proxy/mimo-proxy.mjs`** for V2.6 custom endpoints; the extension is still useful when its model picker exposes V2.6 |
10
10
  | Alternative methods | Direct API (static `thinking: disabled`) or the Xiaomi extension |
11
11
  | Mode (custom endpoint) | **Direct** (static `thinking: disabled`) **or** **Proxy** (dynamic, local on `:3459`) |
12
- | Billing | **Pay-as-You-Go** _or_ **Token Plan subscription** (shared `requestBody`) |
12
+ | Billing | **Pay-as-You-Go** _or_ **Token Plan subscription** (same model config) |
13
13
  | Vision | ✅ Yes (all V2.6 models) |
14
14
  | Tool calling | ✅ Yes; V2.6 preserves thinking only when the history includes `reasoning_content` |
15
15
  | Context | 1M |
@@ -18,6 +18,8 @@
18
18
  | Proxy endpoint | `http://127.0.0.1:3459/v1/chat/completions` |
19
19
  | Auth | `Authorization: Bearer $MIMO_API_KEY` |
20
20
 
21
+ > **Live-validated 2026-11-13** (VS Code 1.146, both harnesses): plain chat plus a multi-step tool loop returned HTTP 200 on both turns through the local proxy. No reasoning history was replayed, so the proxy's fallback injected `thinking: { "type": "disabled" }` on the tool turn and Xiaomi accepted it. Copilot sends 128 tools and Local sends 57; vision and long-context compaction were not tested. See [harness research § 9](../../research/vscode-1.146-copilot-harness.md#9-phase-3-live-provider-validation-2026-11-13).
22
+
21
23
  ### Models
22
24
 
23
25
  | Model | Vision | Context | Max output | Notes |
@@ -67,7 +69,7 @@ The `proxy/mimo-proxy.mjs` preserves V2.6 thinking when assistant tool-call hist
67
69
  - `npm run proxy:mimo` (from the repo root)
68
70
  - `npx copilot-custom-endpoint mimo` (standalone)
69
71
 
70
- When using the proxy, point model URLs to `http://127.0.0.1:3459/v1/chat/completions` and **remove** `thinking` from `requestBody`. The proxy handles it dynamically.
72
+ When using the proxy, point model URLs to `http://127.0.0.1:3459/v1/chat/completions` and leave thinking out of the model entry entirely — `requestBody` is not forwarded on VS Code 1.146. The proxy handles it dynamically.
71
73
 
72
74
  ## Setup
73
75
 
@@ -96,7 +98,11 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
96
98
  | macOS | `~/Library/Application Support/Code/User/chatLanguageModels.json` |
97
99
  | Linux | `~/.config/Code/User/chatLanguageModels.json` |
98
100
 
99
- #### Direct (static `thinking: disabled`)
101
+ > **Context budget:** `917504 + 131072 = 1048576`, the V2.6 window. VS Code uses that sum as the model's total context, so only raise `maxInputTokens` by lowering `maxOutputTokens`. Both blocks below share the same limits.
102
+
103
+ #### Direct (no thinking control)
104
+
105
+ > **⚠️ On VS Code 1.146 the direct path cannot disable thinking.** `requestBody` is dropped, so MiMo keeps its thinking default and tool loops with incomplete reasoning history can fail with HTTP 400. Use the proxy below for tool-heavy work; the direct entry is fine for plain chat.
100
106
 
101
107
  ```json
102
108
  {
@@ -112,13 +118,9 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
112
118
  "toolCalling": true,
113
119
  "vision": true,
114
120
  "streaming": true,
115
- "maxInputTokens": 1048576,
121
+ "maxInputTokens": 917504,
116
122
  "maxOutputTokens": 131072,
117
- "requestBody": {
118
- "thinking": { "type": "disabled" },
119
- "temperature": 1,
120
- "top_p": 0.95
121
- }
123
+ "modelOptions": { "temperature": 1, "top_p": 0.95 }
122
124
  },
123
125
  {
124
126
  "id": "mimo-v2.6-flash",
@@ -127,13 +129,9 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
127
129
  "toolCalling": true,
128
130
  "vision": true,
129
131
  "streaming": true,
130
- "maxInputTokens": 1048576,
132
+ "maxInputTokens": 917504,
131
133
  "maxOutputTokens": 131072,
132
- "requestBody": {
133
- "thinking": { "type": "disabled" },
134
- "temperature": 1,
135
- "top_p": 0.95
136
- }
134
+ "modelOptions": { "temperature": 1, "top_p": 0.95 }
137
135
  },
138
136
  {
139
137
  "id": "mimo-v2.6-pro-ultraspeed",
@@ -142,19 +140,15 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
142
140
  "toolCalling": true,
143
141
  "vision": true,
144
142
  "streaming": true,
145
- "maxInputTokens": 1048576,
143
+ "maxInputTokens": 917504,
146
144
  "maxOutputTokens": 131072,
147
- "requestBody": {
148
- "thinking": { "type": "disabled" },
149
- "temperature": 1,
150
- "top_p": 0.95
151
- }
145
+ "modelOptions": { "temperature": 1, "top_p": 0.95 }
152
146
  }
153
147
  ]
154
148
  }
155
149
  ```
156
150
 
157
- #### With proxy (dynamic thinking, no `requestBody` override)
151
+ #### With proxy (dynamic thinking)
158
152
 
159
153
  ```json
160
154
  {
@@ -170,9 +164,9 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
170
164
  "toolCalling": true,
171
165
  "vision": true,
172
166
  "streaming": true,
173
- "maxInputTokens": 1048576,
167
+ "maxInputTokens": 917504,
174
168
  "maxOutputTokens": 131072,
175
- "requestBody": { "temperature": 1, "top_p": 0.95 }
169
+ "modelOptions": { "temperature": 1, "top_p": 0.95 }
176
170
  },
177
171
  {
178
172
  "id": "mimo-v2.6-flash",
@@ -181,9 +175,9 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
181
175
  "toolCalling": true,
182
176
  "vision": true,
183
177
  "streaming": true,
184
- "maxInputTokens": 1048576,
178
+ "maxInputTokens": 917504,
185
179
  "maxOutputTokens": 131072,
186
- "requestBody": { "temperature": 1, "top_p": 0.95 }
180
+ "modelOptions": { "temperature": 1, "top_p": 0.95 }
187
181
  },
188
182
  {
189
183
  "id": "mimo-v2.6-pro-ultraspeed",
@@ -192,9 +186,9 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
192
186
  "toolCalling": true,
193
187
  "vision": true,
194
188
  "streaming": true,
195
- "maxInputTokens": 1048576,
189
+ "maxInputTokens": 917504,
196
190
  "maxOutputTokens": 131072,
197
- "requestBody": { "temperature": 1, "top_p": 0.95 }
191
+ "modelOptions": { "temperature": 1, "top_p": 0.95 }
198
192
  }
199
193
  ]
200
194
  }
@@ -211,7 +205,7 @@ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
211
205
 
212
206
  ### 2. Token Plan (optional, all methods)
213
207
 
214
- Token Plan subscribers use different base URLs and `tp-` prefixed keys from pay-as-you-go `sk-` keys. The **model id** and **`requestBody`** are the **same** for both billing modes — only the URL and key prefix differ.
208
+ Token Plan subscribers use different base URLs and `tp-` prefixed keys from pay-as-you-go `sk-` keys. The **model id** and the **sampling configuration** are the **same** for both billing modes — only the URL and key prefix differ.
215
209
 
216
210
  | Mode | Key prefix | Base URL (OpenAI) |
217
211
  | ------------- | ---------- | ----------------------------------------- |
@@ -232,7 +226,7 @@ The `proxy/mimo-proxy.mjs` (optional) keeps V2.6 reasoning enabled when the conv
232
226
  | Start | `npm run proxy:mimo` (or `node proxy/mimo-proxy.mjs`) |
233
227
  | Help | `node proxy/mimo-proxy.mjs --help` |
234
228
 
235
- When using the proxy, point model `url`s to `http://127.0.0.1:3459/v1/chat/completions` and **remove** `thinking` from `requestBody`. The proxy handles V2.6 history-aware fallback dynamically.
229
+ When using the proxy, point model `url`s to `http://127.0.0.1:3459/v1/chat/completions` and leave thinking out of the model entry. The proxy handles the V2.6 history-aware fallback dynamically.
236
230
 
237
231
  ## Notes
238
232
 
@@ -243,13 +237,13 @@ When using the proxy, point model `url`s to `http://127.0.0.1:3459/v1/chat/compl
243
237
 
244
238
  ## Troubleshooting
245
239
 
246
- | Symptom | Likely cause | Fix |
247
- | ------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
248
- | HTTP 400 on the second turn of a tool loop | `reasoning_content` missing in history (thinking on) | Use the proxy (`npm run proxy:mimo`), or add `thinking: { type: "disabled" }` to `requestBody`; an extension with a reasoning cache can keep thinking enabled |
249
- | Vision request returns an error | The model entry is missing `vision: true` | Add `vision: true` to the model entry — every current MiMo model accepts image input |
250
- | Custom `tool_choice` ignored | MiMo only honors `"auto"` | Stick to `auto` |
251
- | 401 Unauthorized | Wrong key, or Token Plan URL used with pay-as-you-go key | Match key prefix (`sk-` vs `tp-`) to the endpoint |
252
- | 429 rate-limited | Concurrent sessions exceeded 100 RPM / 10M TPM | Reduce concurrent agent sessions |
240
+ | Symptom | Likely cause | Fix |
241
+ | ------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
242
+ | HTTP 400 on the second turn of a tool loop | `reasoning_content` missing in history (thinking on) | Use the proxy (`npm run proxy:mimo`); `requestBody.thinking` is not forwarded on 1.146, so it cannot serve as a fallback |
243
+ | Vision request returns an error | The model entry is missing `vision: true` | Add `vision: true` to the model entry — every current MiMo model accepts image input |
244
+ | Custom `tool_choice` ignored | MiMo only honors `"auto"` | Stick to `auto` |
245
+ | 401 Unauthorized | Wrong key, or Token Plan URL used with pay-as-you-go key | Match key prefix (`sk-` vs `tp-`) to the endpoint |
246
+ | 429 rate-limited | Concurrent sessions exceeded 100 RPM / 10M TPM | Reduce concurrent agent sessions |
253
247
 
254
248
  ## Pricing
255
249
 
@@ -1,8 +1,8 @@
1
1
  # MiniMax — VS Code Custom Endpoint Setup Guide
2
2
 
3
- > **TL;DR:** **MiniMax-M3.1-Flash** (released October 19, 2026) is the current M-series Flash model and needs no proxy. Use `thinking: { "type": "adaptive" }` + `reasoning_split: true` + `reasoning_effort` in `requestBody` so the model can reason and the response arrives in a clean OpenAI format (`reasoning_content`, kept separate from `content`). **M3.1 Flash cannot disable thinking** — `thinking: { "type": "disabled" }` and `reasoning_effort: "none"` both return HTTP 400 (`requires adaptive thinking`, code 2013) — so tune depth with `reasoning_effort` (`low` / `medium` / `high` / `xhigh` / `max`, default `max`).
3
+ > **TL;DR:** **MiniMax-M3.1-Flash** (released October 19, 2026) is the current M-series Flash model and needs no proxy. Set sampling with `modelOptions` and expose the effort picker with `supportsReasoningEffort` + `reasoningEffortFormat: "chat-completions"`; the server already returns reasoning on `reasoning_content` separately from `content`. **`requestBody` is not forwarded by VS Code 1.146**, so `thinking` and `reasoning_split` cannot be set from `chatLanguageModels.json`. **M3.1 Flash cannot disable thinking** — `thinking: { "type": "disabled" }` and `reasoning_effort: "none"` both return HTTP 400 (`requires adaptive thinking`, code 2013) — so tune depth with `reasoning_effort` (`low` / `medium` / `high` / `xhigh` / `max`, default `max`).
4
4
  >
5
- > 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.
5
+ > The same `url`, `model id`, and model configuration 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.
6
6
  >
7
7
  > **🆕 Try a MiniMax Copilot extension first** (no JSON editing):
8
8
  >
@@ -13,18 +13,22 @@
13
13
 
14
14
  ## At a Glance
15
15
 
16
- | Field | Value |
17
- | ------------------------ | --------------------------------------------------------------------------------------------- |
18
- | Mode | **Direct** (no proxy) |
19
- | Billing | **Pay-as-You-Go** _or_ **Token Plan subscription** (same config) |
20
- | Vision | ✅ Yes (image + video) |
21
- | Tool calling | ✅ Yes |
22
- | Context | 1M |
23
- | Max output | 131072 recommended (524288 max) |
24
- | Required `requestBody` | M3.1 Flash: `thinking: { type: "adaptive" }, reasoning_split: true, reasoning_effort: "high"` |
25
- | Endpoint (international) | `https://api.minimax.io/v1/chat/completions` |
26
- | Endpoint (China) | `https://api.minimaxi.com/v1/chat/completions` |
27
- | Auth | `Authorization: Bearer $MINIMAX_API_KEY` (or Subscription Key, see [Setup](#setup)) |
16
+ | Field | Value |
17
+ | ------------------------ | ----------------------------------------------------------------------------------------------------- |
18
+ | Mode | **Direct** (no proxy) |
19
+ | Billing | **Pay-as-You-Go** _or_ **Token Plan subscription** (same config) |
20
+ | Vision | ✅ Yes (image + video) |
21
+ | Tool calling | ✅ Yes |
22
+ | Context | 1M |
23
+ | Max output | 131072 recommended (524288 max) |
24
+ | Supported config | `modelOptions` for sampling + `supportsReasoningEffort` + `reasoningEffortFormat: "chat-completions"` |
25
+ | Endpoint (international) | `https://api.minimax.io/v1/chat/completions` |
26
+ | Endpoint (China) | `https://api.minimaxi.com/v1/chat/completions` |
27
+ | Auth | `Authorization: Bearer $MINIMAX_API_KEY` (or Subscription Key, see [Setup](#setup)) |
28
+
29
+ > **Live-validated 2026-11-13** (VS Code 1.146, both harnesses): plain chat plus a multi-step tool loop returned HTTP 200 on both turns on the direct route.
30
+ > `reasoning_effort: "medium"` and `max_completion_tokens: 131072` reached MiniMax, and no `thinking`/`reasoning_split` field was needed.
31
+ > `reasoning_content` was not replayed on the tool turn. Copilot sends 128 tools and Local sends 57; vision and long-context compaction were not tested. See [harness research § 9](../../research/vscode-1.146-copilot-harness.md#9-phase-3-live-provider-validation-2026-11-13).
28
32
 
29
33
  ### Models
30
34
 
@@ -72,20 +76,21 @@
72
76
  "toolCalling": true,
73
77
  "vision": true,
74
78
  "streaming": true,
75
- "maxInputTokens": 1048576,
79
+ "maxInputTokens": 868928,
76
80
  "maxOutputTokens": 131072,
77
- "requestBody": {
78
- "thinking": { "type": "adaptive" },
79
- "reasoning_split": true,
80
- "reasoning_effort": "high",
81
- "temperature": 1,
82
- "top_p": 0.95
83
- }
81
+ "modelOptions": { "temperature": 1, "top_p": 0.95 },
82
+ "supportsReasoningEffort": ["low", "medium", "high", "xhigh", "max"],
83
+ "reasoningEffortFormat": "chat-completions",
84
+ "thinking": true
84
85
  }
85
86
  ]
86
87
  }
87
88
  ```
88
89
 
90
+ > **Context budget:** `868928 + 131072 = 1000000`, the M3.1 Flash window. VS Code uses that sum as the model's total context. The API allows up to 524288 output tokens, so raise `maxOutputTokens` only by lowering `maxInputTokens` to keep the sum inside the window.
91
+
92
+ > **Measured on VS Code 1.146:** `modelOptions` and the reasoning-effort metadata reach the provider; `requestBody` does **not**. Provider fields such as `thinking` and `reasoning_split` therefore cannot be set from this file — M3.1 Flash already returns thinking on `reasoning_content` by default, so this is a documentation fix rather than a regression.
93
+
89
94
  > **Model IDs are case-sensitive.** Use exactly `MiniMax-M3.1-Flash` (capital `M`s, lowercase `i`). Do **not** invent suffixed ids: VS Code forwards each `id` as the upstream `model` parameter, and the API only knows that id.
90
95
 
91
96
  ### 2. Select your billing mode
@@ -118,30 +123,22 @@ The same `chatLanguageModels.json` block above is reused unchanged. Only the sec
118
123
  2. Open `platform.minimax.io/user-center/payment/token-plan` and copy the **Subscription Key** (prefix `sk-cp-…`).
119
124
  3. In VS Code, run **Chat: Manage Language Models** → **MiniMax** group → **Update API Key** → paste the Subscription Key.
120
125
 
121
- When the Token Plan 5-hour or weekly quota is exhausted, the request fails with a Token Plan quota error (see [Troubleshooting](#troubleshooting)). At that point you can either wait for the quota window to reset, buy a Credits top-up at the same console (Credits use the same Subscription Key), or swap the key back to your Open Platform API Key to fall back to PAYG. The URL and `requestBody` do not change during the swap.
126
+ When the Token Plan 5-hour or weekly quota is exhausted, the request fails with a Token Plan quota error (see [Troubleshooting](#troubleshooting)). At that point you can either wait for the quota window to reset, buy a Credits top-up at the same console (Credits use the same Subscription Key), or swap the key back to your Open Platform API Key to fall back to PAYG. The URL and model configuration do not change during the swap.
122
127
 
123
128
  ### 4. Thinking depth on M3.1 Flash
124
129
 
125
130
  M3.1 Flash always thinks — `thinking: { "type": "disabled" }` and `reasoning_effort: "none"` both return HTTP 400. The only knob is **`reasoning_effort`**, which accepts `low` / `medium` / `high` / `xhigh` / `max` and defaults to `max` when omitted. Lower levels produce fewer thinking tokens at lower latency; `high` is a good starting point for agent/coding work in VS Code, and `max` matches the configuration Artificial Analysis benchmarked.
126
131
 
127
- ```json
128
- "requestBody": {
129
- "thinking": { "type": "adaptive" },
130
- "reasoning_split": true,
131
- "reasoning_effort": "high",
132
- "temperature": 1,
133
- "top_p": 0.95
134
- }
135
- ```
132
+ On VS Code 1.146 set this through the model picker's **Thinking Effort** control (backed by the `supportsReasoningEffort` metadata above), **not** through `requestBody` — that field is dropped before the request leaves VS Code.
136
133
 
137
- `reasoning_split: true` keeps thinking out of `content` and on `reasoning_content`. Setting it to `false` is not supported on M3.1 Flash, and the server already returns thinking separately by default. `temperature` and `top_p` are accepted but ignored on M3.1 Flash (fixed at `1` and `0.95`); they are kept here only so every provider block in this repo has the same shape.
134
+ `reasoning_split: true` keeps thinking out of `content` and on `reasoning_content`; it cannot be set from `chatLanguageModels.json` on 1.146, and M3.1 Flash already returns thinking separately by default. `temperature` and `top_p` are accepted but ignored on M3.1 Flash (fixed at `1` and `0.95`); they stay in `modelOptions` only so every provider block shares the same shape.
138
135
 
139
136
  ## Notes
140
137
 
141
- - **`thinking: adaptive` + `reasoning_split: true`** is the recommended pair: the server returns thinking on the `reasoning_content` field, which keeps `content` clean for VS Code. The `thinking` field is effectively fixed at `adaptive` (the server rejects `disabled`).
142
- - **`reasoning_effort` controls thinking depth.** Values are `low` / `medium` / `high` / `xhigh` / `max`, default `max`; `none` is rejected.
138
+ - **Thinking output is split by default:** the server returns thinking on `reasoning_content`, keeping `content` clean for VS Code. `thinking` is effectively fixed at `adaptive` (the server rejects `disabled`).
139
+ - **`reasoning_effort` controls thinking depth.** Values are `low` / `medium` / `high` / `xhigh` / `max`, default `max`; `none` is rejected. Choose it in the model picker, not in `requestBody`.
143
140
  - **`temperature: 1`, `top_p: 0.95`** are accepted but **ignored** (M3.1 Flash is fixed at those values); `top_p` must still be inside `(0, 1]` if you send it.
144
- - **Interleaved thinking and tool loops:** MiniMax recommends sending the complete assistant message — including `reasoning_content` — back in history so the reasoning chain stays continuous. VS Code does not preserve `reasoning_content` across tool turns, so expect shallower continuity on long agent runs. This is a quality trade-off, not an error: unlike Kimi K2.7, M3.1 Flash does not reject a tool result whose assistant message lacks reasoning content.
141
+ - **Interleaved thinking and tool loops:** MiniMax recommends sending the complete assistant message — including `reasoning_content` — back in history so the reasoning chain stays continuous. Measured 2026-11-13 on both harnesses: VS Code did **not** replay `reasoning_content` on the MiniMax tool turn (Kimi's entry did), so expect shallower continuity on long agent runs. This is a quality trade-off, not an error: unlike Kimi K2.7, M3.1 Flash does not reject a tool result whose assistant message lacks reasoning content.
145
142
  - **Max output:** `max_completion_tokens` is recommended at 131072 and accepts up to 524288; thinking tokens count toward that limit.
146
143
  - **Rate limits:** 200 RPM / 10M TPM. Input tokens above 512K are available in limited quantity for a limited time.
147
144
 
@@ -150,7 +147,7 @@ M3.1 Flash always thinks — `thinking: { "type": "disabled" }` and `reasoning_e
150
147
  | Symptom | Likely cause | Fix |
151
148
  | -------------------------------------------- | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
152
149
  | Model not in picker | Config not reloaded, or wrong casing | Restart VS Code; verify the model ID is exactly `MiniMax-M3.1-Flash` |
153
- | Reasoning leaks into `content` | Missing `reasoning_split` | Add `reasoning_split: true` to `requestBody` |
150
+ | Reasoning leaks into `content` | Server did not split reasoning | `reasoning_split` cannot be set from `chatLanguageModels.json` on 1.146; check the provider response format instead |
154
151
  | 400 `requires adaptive thinking` (2013) | `thinking: { "type": "disabled" }` or `reasoning_effort: "none"` sent to M3.1 Flash | Remove the override; lower `reasoning_effort` instead. On M3.1 Flash thinking cannot be disabled. |
155
152
  | 400 `reasoning_split` cannot be false | `reasoning_split: false` sent to M3.1 Flash | Use `reasoning_split: true` (or omit it); split output is mandatory on this model. |
156
153
  | 400 / 2013 with `service_tier` | `service_tier` sent to M3.1 Flash | Remove `service_tier` — M3.1 Flash does not accept that field |
@@ -4,20 +4,22 @@
4
4
 
5
5
  ## At a Glance
6
6
 
7
- | Field | Value |
8
- | ---------------------- | -------------------------------------------------------------------------------------------------- |
9
- | Mode | **Proxy** (local on `:3458`) **or** **Direct** (static `enable_thinking: false`) |
10
- | Billing | **Pay-as-You-Go only** — 1M-token free quota for new users |
11
- | Vision | ✅ Yes (`qwen3.8-max`) |
12
- | Tool calling | ✅ Yes |
13
- | Context | 1M |
14
- | Max output | 131K |
15
- | Protocol | **OpenAI-compatible** (`/compatible-mode/v1`) — not native DashScope (`/api/v1`) |
16
- | Endpoint | `https://<your-workspace-id>.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1/chat/completions` |
17
- | Proxy endpoint | `http://127.0.0.1:3458/v1/chat/completions` |
18
- | Auth | `Authorization: Bearer $DASHSCOPE_API_KEY` |
19
- | `requestBody` (direct) | `enable_thinking: false` |
20
- | `requestBody` (proxy) | _none — proxy injects based on tool activity_ |
7
+ | Field | Value |
8
+ | -------------- | -------------------------------------------------------------------------------------------------- |
9
+ | Mode | **Proxy** (local on `:3458`) **or** **Direct** (static `enable_thinking: false`) |
10
+ | Billing | **Pay-as-You-Go only** — 1M-token free quota for new users |
11
+ | Vision | ✅ Yes (`qwen3.8-max`) |
12
+ | Tool calling | ✅ Yes |
13
+ | Context | 1M |
14
+ | Max output | 131K |
15
+ | Protocol | **OpenAI-compatible** (`/compatible-mode/v1`) — not native DashScope (`/api/v1`) |
16
+ | Endpoint | `https://<your-workspace-id>.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1/chat/completions` |
17
+ | Proxy endpoint | `http://127.0.0.1:3458/v1/chat/completions` |
18
+ | Auth | `Authorization: Bearer $DASHSCOPE_API_KEY` |
19
+ | `modelOptions` | `temperature: 1`, `top_p: 0.95` (the only sampling control VS Code forwards) |
20
+ | `requestBody` | **Not forwarded on VS Code 1.146** — thinking must be controlled by the proxy |
21
+
22
+ > **Live-validated 2026-11-13** (VS Code 1.146, both harnesses): plain chat plus a multi-step tool loop returned HTTP 200 on both turns through the local proxy. Turn 1 carried 128 tools and no `tool_choice` (so thinking stayed at the DashScope default) and still succeeded; the proxy injected `enable_thinking: false` on the tool turn. Copilot sends 128 tools and Local sends 57; vision and long-context compaction were not tested. See [harness research § 9](../../research/vscode-1.146-copilot-harness.md#9-phase-3-live-provider-validation-2026-11-13).
21
23
 
22
24
  ### Models
23
25
 
@@ -25,7 +27,7 @@
25
27
  | ------------- | ------ | ------- | ---------- | ------------------------------------------------------- |
26
28
  | `qwen3.8-max` | ✅ Yes | 1M | 131K | Frontier multimodal model; reasoning enabled by default |
27
29
 
28
- > The live `chatLanguageModels.json` points Qwen at the local proxy by default; the direct DashScope URL is shown below for users who prefer a static `enable_thinking: false` setup.
30
+ > The live `chatLanguageModels.json` points Qwen at the local proxy by default. A direct DashScope entry cannot disable reasoning on VS Code 1.146 — `requestBody` is dropped — so the direct path below runs with DashScope's thinking default and is listed only for connectivity checks.
29
31
 
30
32
  ## Quick Start
31
33
 
@@ -88,15 +90,17 @@ API keys are bound to their region (and, on a workspace-dedicated domain, to the
88
90
  "toolCalling": true,
89
91
  "vision": true,
90
92
  "streaming": true,
91
- "maxInputTokens": 991000,
93
+ "maxInputTokens": 868928,
92
94
  "maxOutputTokens": 131072,
93
- "requestBody": { "enable_thinking": false }
95
+ "modelOptions": { "temperature": 1, "top_p": 0.95 }
94
96
  }
95
97
  ]
96
98
  }
97
99
  ```
98
100
 
99
- > The live `chatLanguageModels.json` points Qwen at the local proxy with no `requestBody` override; use the snippet above only if you're not running the proxy.
101
+ > **Context budget:** `868928 + 131072 = 1000000`, the `qwen3.8-max` window. VS Code uses that sum as the model's total context; DashScope separately caps input at 991000 tokens, so 868928 leaves room for the output budget. Raise `maxInputTokens` only by lowering `maxOutputTokens`.
102
+
103
+ > **Direct path caveat:** `enable_thinking` cannot be set from `chatLanguageModels.json` on VS Code 1.146, so reasoning stays at DashScope's default and tool loops may hit `reasoning_content` errors. Use the proxy for tool-heavy work.
100
104
 
101
105
  #### Proxy path
102
106
 
@@ -112,7 +116,7 @@ API keys are bound to their region (and, on a workspace-dedicated domain, to the
112
116
  curl http://127.0.0.1:3458/healthz
113
117
  ```
114
118
 
115
- 2. Use this snippet (URLs point at the proxy; no `requestBody` override):
119
+ 2. Use this snippet (URLs point at the proxy; no thinking configuration needed):
116
120
 
117
121
  ```json
118
122
  {
@@ -128,7 +132,7 @@ API keys are bound to their region (and, on a workspace-dedicated domain, to the
128
132
  "toolCalling": true,
129
133
  "vision": true,
130
134
  "streaming": true,
131
- "maxInputTokens": 991000,
135
+ "maxInputTokens": 868928,
132
136
  "maxOutputTokens": 131072
133
137
  }
134
138
  ]
@@ -193,8 +197,9 @@ The proxy detects active tool use by examining the conversation state (a `"tool"
193
197
  ## Notes
194
198
 
195
199
  - **Vision (`qwen3.8-max`)** uses OpenAI-compatible `content` array format. Base64 data URIs work reliably; external image URLs may fail if DashScope can't reach them. If a drag-and-drop image fails to load, providing the absolute file path (e.g. `c:\path\to\image.png`) in the prompt is a reliable workaround.
196
- - **Qwen 3.8 reasoning:** `qwen3.8-max` enables reasoning by default and supports `reasoning_effort` values `low`, `medium`, and `xhigh` (default). The direct snippet disables reasoning for stable VS Code tool loops; the proxy leaves it on for plain chat and suppresses it when tool activity is detected.
197
- - **Thinking trade-off:** Direct = thinking always off (loops stable, no reasoning visible). Proxy = thinking on in plain chat, off in tool turns.
200
+ - **Qwen 3.8 reasoning:** `qwen3.8-max` enables reasoning by default and supports `reasoning_effort` values `low`, `medium`, and `xhigh` (default). On VS Code 1.146 neither `enable_thinking` nor `reasoning_effort` can be set from `requestBody` — the proxy is what toggles thinking, leaving it on for plain chat and suppressing it when tool activity is detected.
201
+ - **Thinking trade-off:** Proxy = thinking on in plain chat, off in tool turns. Without the proxy, thinking stays on and tool loops are at the provider's mercy.
202
+ - **First tool-capable request:** detection is history-based, so an initial request that sends a `tools` array with no `tool_choice` and no tool-role history is treated as plain chat (thinking stays on). Measured on VS Code 1.146: both the Copilot and Local harnesses send their full tool set with **no** `tool_choice`, so the first turn is always plain chat. `tool_choice: "none"` is also treated as plain chat. See [the harness research](../research/vscode-1.146-copilot-harness.md).
198
203
  - **`tool_choice` only supports `auto`** — don't override it (VS Code's default is `auto`).
199
204
 
200
205
  ## Troubleshooting
@@ -202,12 +207,12 @@ The proxy detects active tool use by examining the conversation state (a `"tool"
202
207
  | Symptom | Likely cause | Fix |
203
208
  | ----------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
204
209
  | "Connection refused" (proxy mode) | Proxy not running | `npm run proxy:qwen` |
205
- | Tool loops fail with `reasoning_content` errors | Direct path missing `enable_thinking: false` | Add `enable_thinking: false` to `requestBody` |
210
+ | Tool loops fail with `reasoning_content` errors | Direct path with thinking on; `requestBody` cannot disable it | Use the proxy (`npm run proxy:qwen`) |
206
211
  | Tool loops still fail with proxy | Proxy not rewriting | Check `debug_log/qwen-proxy.ndjson` — verify `hasTools: true` requests have `rewrittenEnableThinking: false` |
207
212
  | Vision fails with external image URL | DashScope couldn't reach the URL | Use a base64 data URI instead |
208
213
  | 401 Unauthorized | API key region or workspace mismatch | Match your key to the endpoint's region (and workspace, on a workspace-dedicated domain) |
209
214
  | 404 Not Found | URL uses the native DashScope path (`/api/v1`) or omits the path | Use `/compatible-mode/v1/chat/completions` |
210
- | Want to switch back to direct | Proxy mode active | Revert `url` to DashScope endpoint and restore `requestBody.enable_thinking: false` |
215
+ | Want to switch back to direct | Proxy mode active | Revert `url` to the DashScope endpoint; reasoning stays at the provider default |
211
216
 
212
217
  ## Pricing
213
218
 
package/docs/pricing.md CHANGED
@@ -20,7 +20,7 @@ All prices below are in **USD per 1M tokens** (non-cached). To convert to AI cre
20
20
 
21
21
  All models are listed together below, sorted by Cost per intelligence ascending (lower is better). Models without a Cost per intelligence are ordered by estimated session cost ascending. Session cost assumes ~10K input + ~2K output tokens per turn, 50 turns.
22
22
 
23
- **All AA Intelligence Index values in this table were re-based from v4.3.2 to v5.0 on October 31, 2026.** AA’s v5.0 composite aggregates a different evaluation set than v4.3.2, so scores are not comparable with earlier snapshots of this file.
23
+ **All AA Intelligence Index values in this table were re-based from v4.3.2 to v5.0 on October 31, 2026.** AA’s v5.0 composite aggregates a different evaluation set than v4.3.2, so scores are not comparable with earlier snapshots of this file. AA has since relabelled the index **v5.0.1** without changing the ordering; `Gemini 4 Carbon`'s **60** is the current v5.0.1 value (Google's October 28 launch post listed **59** under v5.0).
24
24
 
25
25
  | Model | Provider | Cost per intelligence | Intelligence Score | Input (per 1M) | Cached input | Output (per 1M) | Est. session | Context window |
26
26
  | ---------------------------- | --------- | --------------------- | ------------------ | ----------------------------- | ----------------------------- | ----------------------------- | ------------ | -------------- |
@@ -33,7 +33,9 @@ All models are listed together below, sorted by Cost per intelligence ascending
33
33
  | **MiMo V2.6 Pro** | Xiaomi | **~$0.0102** | **29.9** | $0.435 | $0.0036 | $0.87 | ~$0.30 | 1M |
34
34
  | **GPT-6.1 Terra** | OpenAI | **~$0.0196** | **51** | $1.00 | $0.05 | $5.00 | ~$1.00 | 1M |
35
35
  | **Gemini 3.8 Flash** | Google | **~$0.0246** | **30.5** | $0.75 | $0.075 | $3.75 | ~$0.75 | 1M |
36
+ | **Gemini 4 Hydrogen** | Google | **~$0.0278** | **54** | $1.50 | $0.075 | $7.50 | ~$1.50 | 1M |
36
37
  | **Muse Spark 1.3** | Meta | **~$0.0288** | **36.4** | $1.25 | $0.15 | $4.25 | ~$1.05 | 1M |
38
+ | **Gemini 4 Carbon** | Google | **~$0.0333** | **60** | $2.00 | $0.10 | $10.00 | ~$2.00 | 1M |
37
39
  | **GLM 5.3** | Z.ai | **~$0.0360** | **31.7** | $1.40 | $0.26 | $4.40 | ~$1.14 | 1M |
38
40
  | **GPT-6.1 Sol** | OpenAI | **~$0.0367** | **54.5** | $2.00 | $0.10 | $10.00 | ~$2.00 | 1M |
39
41
  | **Claude Sonnet 5.5** | Anthropic | **~$0.0369** | **54.2** | $2.00 | $0.10 | $10.00 | ~$2.00 | 1M |
@@ -56,7 +58,8 @@ Cost per intelligence = estimated session cost ÷ Intelligence Index score. Sess
56
58
  > - **MiMo:** the table shows cache-miss pricing; cache hits are far cheaper (see the Cached input column). A Token Plan subscription with discounted rates is also available.
57
59
  > - **Anthropic:** cache reads and writes are billed separately. Haiku 5.5 is the only Claude model with prompt-length tiering; the table shows its ≤100K rates. Fast mode is $8 / $40 per 1M.
58
60
  > - **OpenAI:** GPT-6 Sol, GPT-6.1 Sol, and Luna bill cache writes at 1.25× input. Requests over 272K input cost 2× input and cache rates, with 1.5× output.
59
- > - **Gemini 4 Argon:** the $2 / $10 introductory rates run through November 30, 2026, then rise to $4 / $20. Output includes thinking tokens.
61
+ > - **Gemini 4 Argon and Gemini 4 Carbon:** both bill $2 / $10 per 1M with $0.10 implicit cache through November 30, 2026, then rise to $4 / $20 with $0.20 cache; explicit caching is unsupported. Output includes thinking tokens. Batch and Flex are half price; Priority is $3.60 / $18. Carbon is the more deliberate of the two and spends more tokens per task, so its session cost runs higher than Argon's at identical rates.
62
+ > - **Gemini 4 Hydrogen:** flat $1.50 / $7.50 per 1M with $0.075 implicit cache across the entire 1M window; explicit caching is unsupported. Batch and Flex are half price ($0.75 / $3.75), Priority is $2.70 / $13.50, and a free tier is available in AI Studio. Hydrogen always thinks (`low` / `medium` / `high` / `xhigh`), so token spend — and this modeled session cost — rises with the thinking level; its **54** Intelligence Score is Artificial Analysis' `xhigh` measurement, while Google reports **51** at the default `high` level. It is API-only and not Copilot-native as of November 13, 2026.
60
63
  > - **Kimi K3.1 Pro and MiniMax M3.1 Flash:** both always think, so control cost with `reasoning_effort`. See [docs/models/kimi.md](models/kimi.md) and [docs/models/minimax.md](models/minimax.md).
61
64
  > - **GLM:** cache hits are $0.26/M for 5.3 and $0.03/M for 5.3 Flash at list.
62
65
  > - **Qwen:** pricing is tiered by input tokens per request; the table shows non-thinking rates. DashScope offers 1M input + 1M output free tokens per model for 90 days.
@@ -65,7 +68,7 @@ Cost per intelligence = estimated session cost ÷ Intelligence Index score. Sess
65
68
 
66
69
  > **How long does 7,000 credits last?** A Pro+ subscriber running 50-turn sessions can estimate monthly capacity by multiplying each modeled session cost by 100 to convert it to AI credits, then mixing models as needed.
67
70
 
68
- > Prices last verified: November 10, 2026. Always check the official pages for the latest rates:
71
+ > Prices last verified: November 13, 2026. Always check the official pages for the latest rates:
69
72
  >
70
73
  > - [GitHub Copilot models & pricing](https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing)
71
74
  > - [OpenAI pricing](https://openai.com/api/pricing/)
@@ -94,6 +97,15 @@ Cost per intelligence = estimated session cost ÷ Intelligence Index score. Sess
94
97
  > - [GitHub Copilot supported models](https://docs.github.com/en/copilot/reference/ai-models/supported-models)
95
98
  > - [Artificial Analysis GPT-6 Sol](https://artificialanalysis.ai/models/gpt-6-sol), [GPT-6 Luna](https://artificialanalysis.ai/models/gpt-6-luna), [GPT-6.1 Sol](https://artificialanalysis.ai/models/gpt-6-1-sol), [GPT-6.1 Terra](https://artificialanalysis.ai/models/gpt-6-1-terra), [Claude Opus 5.5](https://artificialanalysis.ai/models/claude-opus-5-5), [Claude Sonnet 5.5](https://artificialanalysis.ai/models/claude-sonnet-5-5), [Claude Haiku 5.5](https://artificialanalysis.ai/models/claude-haiku-5-5), [MiMo-V2.6-Flash](https://artificialanalysis.ai/models/mimo-v2-6-flash), [Gemini 4 Argon](https://artificialanalysis.ai/models/gemini-4-argon), [Muse Spark 1.3](https://artificialanalysis.ai/models/muse-spark-1-3), [Kimi K3.1 Pro](https://artificialanalysis.ai/models/kimi-k3-1-pro), and [MiniMax-M3.1-Flash](https://artificialanalysis.ai/models/minimax-m3-1-flash)
96
99
  > - [Google Gemini pricing](https://ai.google.dev/pricing)
100
+ > - [Google Gemini 4 Carbon announcement](https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-gemini-4-carbon/)
101
+ > - [Google Gemini 4 Carbon availability](https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-4-carbon-now-available/)
102
+ > - [Google Gemini 4 Carbon model card](https://storage.googleapis.com/deepmind-media/Model-Cards/Gemini-4-Carbon-Model-Card.pdf)
103
+ > - [GitHub Copilot Gemini 4 Carbon release](https://github.blog/changelog/2026-11-10-gemini-4-carbon-in-github-copilot)
104
+ > - [Artificial Analysis Gemini 4 Carbon](https://artificialanalysis.ai/models/gemini-4-carbon)
105
+ > - [Google Gemini 4 Hydrogen announcement](https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-gemini-4-hydrogen/)
106
+ > - [Google Gemini 4 Hydrogen model card](https://deepmind.google/models/model-cards/gemini-4-hydrogen/)
107
+ > - [Google Gemini 4 Hydrogen pricing](https://ai.google.dev/gemini-api/docs/pricing#gemini-4-hydrogen)
108
+ > - [Artificial Analysis Gemini 4 Hydrogen](https://artificialanalysis.ai/models/gemini-4-hydrogen)
97
109
  > - [Google Gemini 4 Argon (what's new)](https://ai.google.dev/gemini-api/docs/latest-model)
98
110
  > - [Google Gemini 4 Argon model card](https://ai.google.dev/gemini-api/docs/models/gemini-4-argon)
99
111
  > - [GitHub Copilot Gemini 4 Argon release](https://github.blog/changelog/2026-10-13-gemini-4-argon-in-github-copilot)
@@ -0,0 +1,78 @@
1
+ import { hasActiveToolCall, summarizePayload } from './rewrite-summary.mjs'
2
+
3
+ export const KIMI_REWRITE_DEFAULTS = {
4
+ forcedTemperature: 1,
5
+ forcedNonThinkingTemperature: 0.6,
6
+ forcedTopP: 0.95,
7
+ disableThinkingWithTools: true
8
+ }
9
+
10
+ /**
11
+ * Rewrite a Moonshot/Kimi chat-completions payload in place.
12
+ *
13
+ * K2.7 and K3 are always-thinking and reject `thinking: disabled`, so the
14
+ * thinking-disable rewrite is skipped for them. K3 uses `reasoning_effort`
15
+ * instead of `thinking` and rejects the `thinking` parameter entirely.
16
+ *
17
+ * @returns {{ summary: object, consoleMsg: string }}
18
+ */
19
+ export function rewriteKimi(payload, options = {}) {
20
+ const {
21
+ forcedTemperature,
22
+ forcedNonThinkingTemperature,
23
+ forcedTopP,
24
+ disableThinkingWithTools
25
+ } = { ...KIMI_REWRITE_DEFAULTS, ...options }
26
+
27
+ const incomingTemperature = payload.temperature
28
+ const incomingTopP = payload.top_p
29
+ const incomingThinkingType = payload?.thinking?.type
30
+ const incomingReasoningEffort = payload?.reasoning_effort
31
+ const model = payload.model ?? ''
32
+
33
+ const isK27 = model.startsWith('kimi-k2.7')
34
+ const isK3 = model.startsWith('kimi-k3')
35
+ const isAlwaysThinking = isK27 || isK3
36
+
37
+ const hasTools = hasActiveToolCall(payload)
38
+ const useNonThinkingMode =
39
+ !isAlwaysThinking && disableThinkingWithTools && hasTools
40
+ const rewrittenTemperature = useNonThinkingMode
41
+ ? forcedNonThinkingTemperature
42
+ : forcedTemperature
43
+
44
+ payload.temperature = rewrittenTemperature
45
+ payload.top_p = forcedTopP
46
+
47
+ if (useNonThinkingMode) {
48
+ payload.thinking = { type: 'disabled' }
49
+ }
50
+
51
+ // K3 does not accept `thinking` — delete it if present so it doesn't cause a 400
52
+ if (isK3 && payload.thinking) {
53
+ delete payload.thinking
54
+ }
55
+
56
+ const rewriteInfo = {
57
+ model,
58
+ isK27,
59
+ isK3,
60
+ incomingTemperature,
61
+ rewrittenTemperature,
62
+ incomingTopP,
63
+ rewrittenTopP: forcedTopP,
64
+ incomingThinkingType,
65
+ rewrittenThinkingType: payload.thinking?.type,
66
+ incomingReasoningEffort
67
+ }
68
+
69
+ const modeTag = hasTools ? '[tools]' : '[chat]'
70
+ const k27Tag = isK27 ? '[k2.7]' : ''
71
+ const k3Tag = isK3 ? '[k3]' : ''
72
+ const consoleMsg = `${k27Tag}${k3Tag}${modeTag} temperature ${String(incomingTemperature)} -> ${String(rewrittenTemperature)}, top_p ${String(incomingTopP)} -> ${String(forcedTopP)}, thinking ${String(incomingThinkingType)} -> ${String(payload.thinking?.type)}, reasoning_effort ${String(incomingReasoningEffort)}`
73
+
74
+ return {
75
+ summary: summarizePayload(payload, hasTools, rewriteInfo),
76
+ consoleMsg
77
+ }
78
+ }
@@ -1,23 +1,4 @@
1
- function summarizePayload(payload, hasTools, rewriteInfo) {
2
- const messages = Array.isArray(payload.messages) ? payload.messages : []
3
- const tools = Array.isArray(payload.tools) ? payload.tools : []
4
-
5
- return {
6
- model: payload.model,
7
- stream: payload.stream,
8
- hasTools,
9
- toolCount: tools.length,
10
- toolChoice: payload.tool_choice,
11
- ...rewriteInfo,
12
- maxTokens:
13
- payload.max_tokens ??
14
- payload.max_completion_tokens ??
15
- payload.max_output_tokens,
16
- messageCount: messages.length,
17
- messageRoles: messages.map((message) => message?.role).slice(0, 16),
18
- topLevelKeys: Object.keys(payload).sort()
19
- }
20
- }
1
+ import { summarizePayload } from './rewrite-summary.mjs'
21
2
 
22
3
  export function hasMissingReasoningContent(messages) {
23
4
  return messages.some((message) => {