copilot-custom-endpoint 1.6.7 → 1.6.9

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.
@@ -1,8 +1,6 @@
1
1
  # Xiaomi MiMo — VS Code Copilot Chat Setup Guide
2
2
 
3
- > **TL;DR:** The **recommended** way to use MiMo with Copilot Chat is the [Xiaomi MiMo for Copilot Chat](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) VS Code extension — it supports thinking mode WITH tool calling, prompt caching feedback, reasoning visibility in agent mode, and token usage reporting, all with zero dependencies (no proxy server needed). Two alternative methods are documented below for users who prefer direct `chatLanguageModels.json` control: direct API with static `thinking: disabled`, or via `proxy/mimo-proxy.mjs` for dynamic thinking suppression.
4
- >
5
- > **June 2026 provider notice:** Xiaomi says the legacy ids `mimo-v2-pro` and `mimo-v2-omni` have already been auto-switched to V2.5 replacements and billed at V2.5-series pricing. Xiaomi's same notice also retires an older legacy chat alias and the `mimo-v2-tts` alias. Requests that still use retired legacy aliases are scheduled to start failing after **2026-06-30 00:00 Beijing time**. This guide now documents only the current V2.5 chat ids.
3
+ > **TL;DR:** The recommended path is the [Xiaomi MiMo for Copilot Chat](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) VS Code extension — it supports thinking mode WITH tool calling, prompt caching feedback, reasoning visibility in agent mode, and token usage reporting, with zero dependencies. Two alternative methods are documented below for users who prefer direct `chatLanguageModels.json` control.
6
4
 
7
5
  ## At a Glance
8
6
 
@@ -13,30 +11,26 @@
13
11
  | Vision | ✅ Yes (`mimo-v2.5` only) |
14
12
  | Tool calling | ✅ Yes (with thinking disabled, OR thinking enabled via the extension's reasoning cache) |
15
13
  | Context | 917K (extension) / 1M (custom endpoint) |
16
- | Max output | 131072 (UltraSpeed / V2.5 Pro) / 32768 (V2.5) |
14
+ | Max output | 131072 (V2.5 Pro) / 32768 (V2.5) |
17
15
  | Dependencies | Extension: **none**. Proxy method: Node.js + `proxy/mimo-proxy.mjs` |
18
16
 
19
- ### Models at a glance
17
+ ### Models
20
18
 
21
- | Model | Vision | Context | Role |
22
- | -------------------------- | ------ | ------- | ---------------------------------------------------- |
23
- | `mimo-v2.5-pro-ultraspeed` | ❌ | 917K | Fast Pro reasoning for latency-sensitive agent tasks |
24
- | `mimo-v2.5-pro` | ❌ | 917K | Flagship text-only — best for deep reasoning |
25
- | `mimo-v2.5` | ✅ | 917K | Omnimodal — text + image + video + audio |
19
+ | Model | Vision | Context | Role |
20
+ | -------------------------- | ------ | ------- | --------------------------------------------------------------------- |
21
+ | `mimo-v2.5-pro-ultraspeed` | ❌ | 917K | Fast Pro reasoning for latency-sensitive agent tasks (extension only) |
22
+ | `mimo-v2.5-pro` | ❌ | 917K | Flagship text-only — best for deep reasoning |
23
+ | `mimo-v2.5` | ✅ | 917K | Omnimodal — text + image + video + audio |
26
24
 
27
- > **Note:** `mimo-v2.5-pro-ultraspeed` is only available through the VS Code extension. The custom-endpoint methods below only cover `mimo-v2.5-pro` and `mimo-v2.5`.
28
- >
29
- > Official June 2026 notice: legacy pre-V2.5 chat aliases now auto-route to V2.5 replacements and become invalid after **2026-06-30 00:00 Beijing time**. This guide intentionally omits retired alias names so new configs only show supported ids.
25
+ > `mimo-v2.5-pro-ultraspeed` is only available through the VS Code extension. Custom-endpoint methods below cover `mimo-v2.5-pro` and `mimo-v2.5`.
30
26
 
31
27
  ## Quick Start
32
28
 
33
29
  ### Recommended: VS Code Extension
34
30
 
35
- The [Xiaomi MiMo for Copilot Chat](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) extension is the easiest and most capable way to use MiMo with Copilot Chat:
36
-
37
31
  1. **Install** from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot).
38
32
  2. **Set your API key** — run **MiMo: Set API Key** from the Command Palette (`Ctrl+Shift+P`).
39
- 3. **Pick a model** — open Copilot Chat, click the model picker, and choose **MiMo-V2.5-Pro-UltraSpeed**, **MiMo V2.5 Pro**, or **MiMo V2.5**.
33
+ 3. **Pick a model** in Copilot Chat's model picker — choose **MiMo-V2.5-Pro-UltraSpeed**, **MiMo V2.5 Pro**, or **MiMo V2.5**.
40
34
  4. That's it — chat away.
41
35
 
42
36
  **Why the extension over custom endpoints:**
@@ -50,32 +44,25 @@ The [Xiaomi MiMo for Copilot Chat](https://marketplace.visualstudio.com/items?it
50
44
  | `mimo-v2.5-pro-ultraspeed` model | ✅ Yes | ❌ Not available |
51
45
  | Multi-region endpoint selector | ✅ Built-in dropdown | ❌ Manual JSON edits |
52
46
  | Dependencies | ✅ Zero (VS Code + Node built-ins) | ❌ Requires proxy server |
53
- | API key validation | ✅ `sk-` / `tp-` prefix check | ❌ Generic secret input |
54
-
55
- > **Prerequisites:** VS Code 1.116+, GitHub Copilot subscription (Free tier works), and a MiMo API key from [platform.xiaomimimo.com](https://platform.xiaomimimo.com/console/api-keys). The extension is MIT-licensed. Source: [Sdcb/xiaomimimo-for-copilot](https://github.com/Sdcb/xiaomimimo-for-copilot).
56
47
 
57
- The extension exposes models as a proper `LanguageModelChatProvider` (vendor `'mimo'`), so they appear directly in the Copilot Chat model picker alongside GPT-4o, Claude, and friends. Switch models mid-chat without losing history.
58
-
59
- For a detailed comparison of extension vs. custom-endpoint features, see [docs/research/mimo-improvements.md](../research/mimo-improvements.md).
48
+ > **Prerequisites:** VS Code 1.116+, GitHub Copilot subscription (Free tier works), and a MiMo API key from [platform.xiaomimimo.com](https://platform.xiaomimimo.com/console/api-keys). MIT-licensed. Source: [Sdcb/xiaomimimo-for-copilot](https://github.com/Sdcb/xiaomimimo-for-copilot).
60
49
 
61
50
  ### Alternative: Direct API (static `thinking: disabled`)
62
51
 
63
52
  Simplest no-proxy approach — but thinking is always off, so you never see model reasoning.
64
53
 
65
- 1. **Edit `chatLanguageModels.json`** — add the MiMo block(s) from [Setup → Direct](#direct-static-thinking-disabled) below.
54
+ 1. **Edit `chatLanguageModels.json`** — add the MiMo block(s) below.
66
55
  2. **Set your `MIMO_API_KEY`** via Command Palette → **Chat: Manage Language Models**.
67
56
  3. **Restart VS Code** and pick "MiMo V2.5 Pro" or "MiMo V2.5".
68
57
 
69
58
  ### Alternative: With optional proxy (dynamic thinking)
70
59
 
71
- The `proxy/mimo-proxy.mjs` provides dynamic thinking suppression: reasoning stays ON in plain chat but turns OFF automatically when tools are invoked. A middle ground — you see reasoning in chat but not during agent mode.
60
+ The `proxy/mimo-proxy.mjs` provides dynamic thinking suppression: reasoning stays ON in plain chat but turns OFF automatically when tools are invoked. A middle ground — reasoning visible in chat, suppressed in agent mode.
72
61
 
73
62
  - `npm run proxy:mimo` (from the repo root)
74
- - `npx copilot-custom-endpoint mimo` (standalone, no clone needed)
75
- - `npx copilot-custom-endpoint` (also starts the Kimi and Qwen proxies concurrently)
76
- - `node proxy/mimo-proxy.mjs --help` — prints all supported environment variables and defaults
63
+ - `npx copilot-custom-endpoint mimo` (standalone)
77
64
 
78
- When using the proxy, update your model URLs to `http://127.0.0.1:3459/v1/chat/completions` and **remove** `thinking` from `requestBody`. The proxy handles it dynamically.
65
+ 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.
79
66
 
80
67
  ## Setup
81
68
 
@@ -94,12 +81,10 @@ When using the proxy, update your model URLs to `http://127.0.0.1:3459/v1/chat/c
94
81
  | `mimo-copilot.maxTokens` | `0` | Max output tokens (`0` = API default, capped at 131072) |
95
82
  | `mimo-copilot.modelIdOverrides` | `{}` | Override API model IDs for third-party proxies |
96
83
 
97
- The extension stores your API key in VS Code's `SecretStorage` (OS keychain) — never in `settings.json`, never in Git history.
84
+ The extension stores your API key in VS Code's `SecretStorage` (OS keychain).
98
85
 
99
86
  ### Alternative: Custom Endpoint (direct or proxy)
100
87
 
101
- Config file location:
102
-
103
88
  | OS | Path |
104
89
  | ------- | ----------------------------------------------------------------- |
105
90
  | Windows | `%APPDATA%\Code\User\chatLanguageModels.json` |
@@ -167,10 +152,7 @@ Config file location:
167
152
  "streaming": true,
168
153
  "maxInputTokens": 1048576,
169
154
  "maxOutputTokens": 131072,
170
- "requestBody": {
171
- "temperature": 1,
172
- "top_p": 0.95
173
- }
155
+ "requestBody": { "temperature": 1, "top_p": 0.95 }
174
156
  },
175
157
  {
176
158
  "id": "mimo-v2.5",
@@ -181,10 +163,7 @@ Config file location:
181
163
  "streaming": true,
182
164
  "maxInputTokens": 1048576,
183
165
  "maxOutputTokens": 32768,
184
- "requestBody": {
185
- "temperature": 1,
186
- "top_p": 0.95
187
- }
166
+ "requestBody": { "temperature": 1, "top_p": 0.95 }
188
167
  }
189
168
  ]
190
169
  }
@@ -197,74 +176,25 @@ Config file location:
197
176
  3. Find the **MiMo** group → **Update API Key**.
198
177
  4. Paste your MiMo API key.
199
178
 
200
- > After setting via the UI, VS Code replaces `"apiKey": ""` with a `${input:chat.lm.secret.<id>}` reference.
201
- >
202
- > The extension uses its own **MiMo: Set API Key** command instead — skip this step if using the extension.
179
+ > VS Code replaces `"apiKey": ""` with a `${input:chat.lm.secret.<id>}` reference. The extension uses its own **MiMo: Set API Key** command instead — skip this step if using the extension.
203
180
 
204
181
  ### 2. Token Plan (optional, all methods)
205
182
 
206
- Token Plan subscribers use different base URLs and `tp-` prefixed keys from the pay-as-you-go `sk-` keys. The **model id** (`mimo-v2.5-pro`, `mimo-v2.5`) and **`requestBody`** (thinking, temperature, top_p) are the **same** for both billing modes — only the URL and key prefix differ.
183
+ 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.
207
184
 
208
185
  | Mode | Key prefix | Base URL (OpenAI) |
209
186
  | ------------- | ---------- | ----------------------------------------- |
210
187
  | Pay-as-you-go | `sk-…` | `https://api.xiaomimimo.com/v1` |
211
188
  | Token Plan | `tp-…` | `https://token-plan-cn.xiaomimimo.com/v1` |
212
189
 
213
- | Protocol | Base URL (Token Plan) |
214
- | --------- | ------------------------------------------------ |
215
- | OpenAI | `https://token-plan-cn.xiaomimimo.com/v1` |
216
- | Anthropic | `https://token-plan-cn.xiaomimimo.com/anthropic` |
217
-
218
- > The extension has a built-in multi-region endpoint selector covering all Token Plan regions (China, Singapore, Amsterdam). With the custom endpoint method, update the `url` in `chatLanguageModels.json` and swap the key — the rest of the config stays as-is. Note that the Token Plan endpoint is `token-plan-cn.xiaomimimo.com` (China-hosted), which differs from the PAYG endpoint `api.xiaomimimo.com`.
219
-
220
- ### 3. Legacy id retirement schedule (all methods)
221
-
222
- From Xiaomi's June 2026 deprecation notice:
223
-
224
- | Legacy id | Replacement | Status on 2026-06-24 | Final cutoff |
225
- | -------------- | --------------- | -------------------------------------------- | ----------------------------- |
226
- | `mimo-v2-pro` | `mimo-v2.5-pro` | Auto-switched | 2026-06-30 00:00 Beijing time |
227
- | `mimo-v2-omni` | `mimo-v2.5` | Auto-switched | 2026-06-30 00:00 Beijing time |
228
- | `mimo-v2-tts` | `mimo-v2.5-tts` | Auto-switch on 2026-06-25 00:00 Beijing time | 2026-06-30 00:00 Beijing time |
229
-
230
- Xiaomi's notice also includes an additional retired legacy chat alias that auto-switches to `mimo-v2.5`; it is intentionally omitted here so the examples only show the ids you should still configure.
231
-
232
- For VS Code custom endpoint chat usage, configure the V2.5 ids directly rather than relying on retiring aliases.
233
-
234
- ## Configuration Reference
235
-
236
- ### Sampling parameters
237
-
238
- | Task type | `temperature` | `top_p` |
239
- | -------------------- | ------------- | ------- |
240
- | Agentic / tool-use | `0.3` | `0.95` |
241
- | Vibe coding | `0.3` | `0.95` |
242
- | General conversation | `0.8` | `0.95` |
243
- | Math reasoning | `1.0` | `0.95` |
244
-
245
- > For `mimo-v2.5-pro` and `mimo-v2.5`, MiMo's docs recommend `temperature: 1.0` and `top_p: 0.95` regardless of task. In thinking mode these models also **lock** `temperature` to `1.0` — any custom value is silently overridden. Since we disable thinking, your `requestBody` value is honored.
246
-
247
- MiMo accepts `temperature` in `[0, 1.5]` and `top_p` in `[0.01, 1.0]`.
248
-
249
- ### Thinking mode
250
-
251
- | Model | API default `thinking.type` | API default `temperature` |
252
- | ---------------------------- | --------------------------- | -------------------------- |
253
- | `mimo-v2.5-pro`, `mimo-v2.5` | `enabled` | `1.0` (locked in thinking) |
254
-
255
- When thinking is enabled, responses include a `reasoning_content` field alongside `content` and `tool_calls`.
256
-
257
- ### Capabilities
258
-
259
- - Streaming (SSE, standard OpenAI format).
260
- - Tool calling with `tool_choice: "auto"`.
261
- - Vision (image input via OpenAI `content` array) on `mimo-v2.5` only.
262
- - `tool_choice` other than `"auto"` is **stripped** and treated as `"auto"`.
263
- - `mimo-v2.5` also supports video and audio understanding.
190
+ The extension has a built-in multi-region endpoint selector covering all Token Plan regions (China, Singapore, Amsterdam). With the custom endpoint method, update the `url` in `chatLanguageModels.json` and swap the key.
264
191
 
265
- ### Rate limits
192
+ ## Notes
266
193
 
267
- **100 RPM / 10M TPM** per model per account.
194
+ - **Thinking is required for full agent quality.** MiMo returns HTTP 400 if `reasoning_content` is missing from history when thinking is on. Custom endpoints disable thinking on tool turns to avoid this; the extension solves it natively via a per-`tool_call_id` reasoning cache.
195
+ - **`tool_choice` other than `"auto"` is stripped** and treated as `"auto"`. Don't override it (VS Code's default is `auto`).
196
+ - **Rate limits:** 100 RPM / 10M TPM per model per account.
197
+ - **Vision (image input via OpenAI `content` array) is only on `mimo-v2.5`.** `mimo-v2.5-pro` and `mimo-v2.5-pro-ultraspeed` are text-only.
268
198
 
269
199
  ## Troubleshooting
270
200
 
@@ -286,89 +216,3 @@ For the cross-provider comparison, see [docs/pricing.md](../pricing.md). Oversea
286
216
  | `mimo-v2.5` | $0.08 / 1M | $0.40 / 1M | $2.00 / 1M |
287
217
 
288
218
  > Cache writing is currently free of charge (limited-time offer). MiMo also offers a Token Plan subscription with discounted rates and a free cache-writing promotion.
289
-
290
- ---
291
-
292
- ## Background & Findings
293
-
294
- > This appendix preserves the validation narrative for future reference. It is not required to use the model.
295
-
296
- ### The critical `reasoning_content` constraint
297
-
298
- When thinking mode is enabled and the conversation history contains tool calls, the `reasoning_content` field **must** be fully passed back in every subsequent assistant message. Otherwise, the API returns HTTP 400.
299
-
300
- This is the same class of problem as Qwen's `reasoning_content` issue, but **stricter**: MiMo's API actively rejects requests with missing historical `reasoning_content`, rather than silently degrading.
301
-
302
- **Implication for VS Code Copilot:** VS Code's agent mode is unlikely to preserve `reasoning_content` across multi-turn tool loops. Therefore:
303
-
304
- - **Thinking enabled + tool calling = broken** (400 errors after the first tool round-trip) — _unless using the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot), which caches and re-injects `reasoning_content`._
305
- - **Thinking disabled + tool calling = works** (no `reasoning_content` to preserve).
306
- - **Thinking enabled + plain chat = works** (no tool calls in history).
307
-
308
- ### Extension solves the `reasoning_content` problem natively
309
-
310
- The [Xiaomi MiMo for Copilot Chat](https://github.com/Sdcb/xiaomimimo-for-copilot) extension implements a reasoning-content cache that makes thinking mode work WITH tool calling. It:
311
-
312
- 1. Caches `reasoning_content` keyed by `tool_call_id` as the model streams tool calls.
313
- 2. Re-injects cached reasoning into prior assistant messages when reconstructing history for subsequent turns.
314
- 3. Prunes stale entries at conversation start (messages ≤ 2) or via LRU eviction (max 200 entries).
315
-
316
- This is the single biggest architectural advantage of the extension over the proxy approach. See [docs/research/mimo-improvements.md](../research/mimo-improvements.md) for a full comparison.
317
-
318
- ### Proxy for dynamic thinking suppression
319
-
320
- A dynamic proxy (`proxy/mimo-proxy.mjs`) is now available — same pattern as `proxy/qwen-proxy.mjs`. It suppresses thinking only when tools are present, letting plain chat show reasoning while keeping tool loops stable.
321
-
322
- - **Plain chat** → `thinking` is removed from the request body, so MiMo uses its API default (enabled for V2.5 Pro / V2.5).
323
- - **Tool-enabled requests** → `thinking: { type: "disabled" }` is injected, preventing `reasoning_content` 400 errors.
324
-
325
- Static suppression (direct mode) remains a perfectly valid simpler alternative.
326
-
327
- ### Benchmark highlights (from official MiMo V2.5 announcement)
328
-
329
- | Model | SWE-Bench Verified | SWE-Bench Pro | Terminal-Bench 2.0 | AIME 2025 |
330
- | --------------- | ------------------ | ------------- | ------------------ | --------- |
331
- | `mimo-v2.5-pro` | — | 57.2% | 68.4% | — |
332
- | `mimo-v2.5` | — | 56.1% | — | — |
333
-
334
- > `mimo-v2.5` additionally scores 87.7% on Video-MME and 62.3% on Claw-Eval Text.
335
-
336
- ### Validation results
337
-
338
- | # | Test | Model | Result |
339
- | --- | ----------------------------------------- | --------------- | ------------------------------------------------------------------------------------- |
340
- | 1 | Add provider to `chatLanguageModels.json` | All | ✅ |
341
- | 2 | Plain chat in VS Code | `mimo-v2.5-pro` | ✅ — model self-identified as MiMo 1T-param |
342
- | 3 | Agent mode (tool calling) | `mimo-v2.5-pro` | ✅ — file reads, browser automation, terminal, image viewing all worked |
343
- | 4 | Vision | `mimo-v2.5` | ✅ — analyzed an attached screenshot (Facebook post, browser tabs, sidebar) in detail |
344
-
345
- External API checks (curl):
346
-
347
- | Check | Model | Result |
348
- | ------------------ | --------------- | ------ |
349
- | Non-streaming chat | `mimo-v2.5-pro` | ✅ |
350
-
351
- ### Known risks
352
-
353
- | Risk | Detail | Mitigation |
354
- | ------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
355
- | `reasoning_content` 400 errors | If thinking is accidentally enabled in tool loops, API returns 400 | **Use the extension** (solves natively). Or: set `thinking.type: "disabled"` in `requestBody` (direct), or use the proxy |
356
- | `tool_choice` only supports `"auto"` | Non-`auto` values are stripped | Should not affect VS Code, which uses `auto` |
357
- | Auth header format | Both `api-key:` and `Authorization: Bearer` work | VS Code sends `Authorization: Bearer` — works directly |
358
- | `temperature` locked in thinking mode | V2.5 Pro / V2.5 force `temperature: 1.0` when thinking is on | Not an issue when thinking is disabled |
359
- | 1M context window | VS Code may not send enough tokens to benefit | Set conservatively; adjust after testing |
360
-
361
- ## References
362
-
363
- - API Platform: `https://platform.xiaomimimo.com/`
364
- - OpenAI API Reference: `https://platform.xiaomimimo.com/docs/en-US/api/chat/openai-api`
365
- - First API Call Guide: `https://platform.xiaomimimo.com/docs/en-US/quick-start/first-api-call`
366
- - Model & Rate Limits: `https://platform.xiaomimimo.com/docs/en-US/quick-start/model`
367
- - Model Hyperparameters: `https://platform.xiaomimimo.com/docs/en-US/quick-start/model-hyperparameters`
368
- - Pricing: `https://platform.xiaomimimo.com/docs/en-US/pricing`
369
- - `reasoning_content` Guide: `https://platform.xiaomimimo.com/docs/en-US/usage-guide/passing-back-reasoning_content`
370
- - AI Tools Integration: `https://platform.xiaomimimo.com/docs/en-US/integration/claude-code`
371
- - HuggingFace (MiMo-V2.5): `https://huggingface.co/XiaomiMiMo/MiMo-V2.5`
372
- - HuggingFace (MiMo-V2.5-Pro): `https://huggingface.co/XiaomiMiMo/MiMo-V2.5-Pro`
373
- - MiMo V2.5 Blog: `https://mimo.xiaomi.com/mimo-v2-5`
374
- - AI Studio (playground): `https://aistudio.xiaomimimo.com/`
@@ -2,9 +2,9 @@
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
- > 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. See [API key source](#3-api-key-source) below.
6
-
7
- > **🆕 Try the MiniMax Copilot extension first.** If you have a **Token Plan subscription** (`sk-cp-…` key), use the [**MiniMax Copilot** VS Code extension](https://marketplace.visualstudio.com/items?itemName=klarkxy.minimax-vscode-copilot) instead — it gives you reasoning visibility, a usage dashboard, status-bar quota monitoring, one-click region switching, and M3 1M context toggling. Install → `MiniMax: Add API Key` → done. No JSON editing.
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.
6
+ >
7
+ > **🆕 Try the MiniMax Copilot extension first.** If you have a **Token Plan subscription** (`sk-cp-…` key), the [**MiniMax Copilot** VS Code extension](https://marketplace.visualstudio.com/items?itemName=klarkxy.minimax-vscode-copilot) gives you reasoning visibility, a usage dashboard, status-bar quota monitoring, one-click region switching, and M3 1M context toggling — no JSON editing.
8
8
  >
9
9
  > **PAYG users:** the extension targets the Anthropic-compatible endpoint which requires a Token Plan subscription key. If you're on pay-as-you-go, use the manual setup below — it works with both PAYG and Token Plan keys on the OpenAI-compatible endpoint.
10
10
 
@@ -26,7 +26,7 @@
26
26
 
27
27
  ## Quick Start
28
28
 
29
- 1. **Edit `chatLanguageModels.json`** — add the MiniMax block from [Setup](#setup) below.
29
+ 1. **Edit `chatLanguageModels.json`** — add the MiniMax block below.
30
30
  2. **Set your `MINIMAX_API_KEY`** via Command Palette → **Chat: Manage Language Models**.
31
31
  3. **Restart VS Code** and pick "MiniMax M3" in the chat picker.
32
32
 
@@ -34,8 +34,6 @@
34
34
 
35
35
  ### 1. VS Code configuration
36
36
 
37
- Config file location:
38
-
39
37
  | OS | Path |
40
38
  | ------- | ----------------------------------------------------------------- |
41
39
  | Windows | `%APPDATA%\Code\User\chatLanguageModels.json` |
@@ -69,6 +67,8 @@ Config file location:
69
67
  }
70
68
  ```
71
69
 
70
+ > **Model IDs are case-sensitive.** Use exactly `MiniMax-M3` (not `minimax-m3` or `MINIMAX-M3`).
71
+
72
72
  ### 2. Select your billing mode
73
73
 
74
74
  MiniMax exposes the **same** `https://api.minimax.io/v1/chat/completions` endpoint and the **same** `MiniMax-M3` model id to both billing modes. The only field that changes is the API key — the rest of `chatLanguageModels.json` stays identical.
@@ -78,7 +78,7 @@ MiniMax exposes the **same** `https://api.minimax.io/v1/chat/completions` endpoi
78
78
  | Pay-as-You-Go | **Open Platform API Key** | `platform.minimax.io/user-center/basic-information/interface-key` | Per-token, deducted from your account balance |
79
79
  | Token Plan | **Subscription Key** (prefix `sk-cp-…`) | `platform.minimax.io/user-center/payment/token-plan` | Monthly quota (5-hour rolling + weekly windows) |
80
80
 
81
- The two keys are **not interchangeable** — a Subscription Key against a PAYG-only endpoint or a PAYG key against the Token Plan quota will be rejected. The Token Plan docs are explicit: _"Subscription Keys are separate from standard pay-as-you-go API Keys."_ ([FAQ](https://platform.minimax.io/docs/token-plan/faq#api-key-interchangeable))
81
+ The two keys are **not interchangeable** — a Subscription Key against a PAYG-only endpoint or a PAYG key against the Token Plan quota will be rejected.
82
82
 
83
83
  ### 3. API key source
84
84
 
@@ -89,19 +89,17 @@ The two keys are **not interchangeable** — a Subscription Key against a PAYG-o
89
89
  3. Find the **MiniMax** group → **Update API Key**.
90
90
  4. Paste your **Open Platform API Key** from `platform.minimax.io/user-center/basic-information/interface-key`.
91
91
 
92
- > After setting via the UI, VS Code replaces `"apiKey": ""` with a `${input:chat.lm.secret.<id>}` reference.
92
+ > VS Code replaces `"apiKey": ""` with a `${input:chat.lm.secret.<id>}` reference.
93
93
 
94
94
  #### Option B — Token Plan Subscription Key
95
95
 
96
96
  The same `chatLanguageModels.json` block above is reused unchanged. Only the secret stored under `${input:chat.lm.secret.<id>}` is replaced with your Subscription Key.
97
97
 
98
- 1. Subscribe to a Token Plan (Plus $20 / Max $50 / Ultra $120) at <https://platform.minimax.io/subscribe/token-plan>. Annual billing is also available.
98
+ 1. Subscribe to a Token Plan (Plus $20 / Max $50 / Ultra $120) at <https://platform.minimax.io/subscribe/token-plan>.
99
99
  2. Open `platform.minimax.io/user-center/payment/token-plan` and copy the **Subscription Key** (prefix `sk-cp-…`).
100
100
  3. In VS Code, run **Chat: Manage Language Models** → **MiniMax** group → **Update API Key** → paste the Subscription Key.
101
101
 
102
- That's it. The endpoint, model id, and `requestBody` stay exactly the same. VS Code's Copilot Chat will now route the same `MiniMax-M3` requests through the Token Plan quota instead of the PAYG balance.
103
-
104
- > 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 (a) wait for the quota window to reset, (b) buy a Credits top-up at the same console (Credits use the same Subscription Key and cover eligible overflow), or (c) swap the key in **Chat: Manage Language Models** back to your Open Platform API Key to fall back to PAYG. The URL and `requestBody` do not change during the swap.
102
+ 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.
105
103
 
106
104
  ### 4. Regional endpoints
107
105
 
@@ -110,57 +108,14 @@ That's it. The endpoint, model id, and `requestBody` stay exactly the same. VS C
110
108
  | International | `https://api.minimax.io/v1/chat/completions` |
111
109
  | China | `https://api.minimaxi.com/v1/chat/completions` |
112
110
 
113
- > API keys are region-specific and cannot be used across regions. The same PAYG-vs-Token-Plan distinction applies to the China region (`api.minimaxi.com`); Subscription Keys are issued at `platform.minimaxi.com/user-center/payment/token-plan`.
114
-
115
- ## Configuration Reference
116
-
117
- ### Sampling parameters
118
-
119
- | Task type | `temperature` | `top_p` |
120
- | -------------------- | ------------- | ------- |
121
- | Agentic / tool-use | `1.0` | `0.95` |
122
- | Coding | `1.0` | `0.95` |
123
- | General conversation | `1.0` | `0.95` |
124
-
125
- M3 accepts `temperature` in `[0, 2]` and `top_p` in `[0, 1]`.
126
-
127
- ### Thinking mode
128
-
129
- | `thinking.type` | Behavior |
130
- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
131
- | `adaptive` | **Recommended.** Model decides whether to think. |
132
- | `disabled` | Soft hint only — the model still reasons internally and emits `<think>` / `reasoning_content` regardless. Use only if you want a different response field layout. |
133
-
134
- When thinking is enabled (any mode), the server returns thinking in one of two formats:
135
-
136
- 1. **Native** (default): thinking is embedded in `content` wrapped in `<think>` tags.
137
- 2. **Interleaved Thinking** (`reasoning_split: true`): thinking is separated into a `reasoning_details` field for cleaner programmatic access.
111
+ > API keys are region-specific. The same PAYG-vs-Token-Plan distinction applies to the China region (`api.minimaxi.com`); Subscription Keys are issued at `platform.minimaxi.com/user-center/payment/token-plan`.
138
112
 
139
- VS Code will most likely **ignore** the extra `reasoning_details` / `reasoning_content` / `delta.reasoning` fields it doesn't recognize, so `reasoning_split: true` is the cleanest way to keep `content` clean.
113
+ ## Notes
140
114
 
141
- ### Capabilities
142
-
143
- - Streaming (SSE, standard OpenAI format).
144
- - Tool calling with `tool_choice: "auto"`.
145
- - Vision: image and video understanding (M3 only).
146
- - Native multimodal training from step zero.
147
- - Interleaved Thinking: model can reason between each round of tool interactions.
148
- - Automatic prompt caching (no configuration needed).
149
- - 1M context enables long-range agent tasks, long-horizon coding, and long-video understanding.
150
-
151
- ### Rate limits
152
-
153
- | Model | RPM | TPM |
154
- | ------------ | --- | ---------- |
155
- | `MiniMax-M3` | 200 | 10,000,000 |
156
-
157
- > Input tokens above 512K are available in limited quantity for a limited time. Contact sales for access.
158
-
159
- ### Model ID casing
160
-
161
- MiniMax model IDs are **case-sensitive**. Use exactly:
162
-
163
- - `MiniMax-M3` (not `minimax-m3` or `MINIMAX-M3`)
115
+ - **`thinking: adaptive` + `reasoning_split: true`** is the recommended pair: the model decides when to reason, and the server returns reasoning in a structured `reasoning_details` field that keeps `content` clean for VS Code. The model still reasons regardless of `thinking.type` — the setting only changes the response field layout.
116
+ - **`temperature: 1`, `top_p: 0.95`** are the recommended sampling values for agent/coding work. M3 accepts `temperature` in `[0, 2]` and `top_p` in `[0, 1]`.
117
+ - **Vision is image + video on M3 only.**
118
+ - **Rate limits:** 200 RPM / 10M TPM. Input tokens above 512K are available in limited quantity for a limited time.
164
119
 
165
120
  ## Troubleshooting
166
121
 
@@ -191,7 +146,7 @@ For the cross-provider comparison, see [docs/pricing.md](../pricing.md). MiniMax
191
146
 
192
147
  ### Token Plan (subscription)
193
148
 
194
- The Token Plan is a **monthly or annual** subscription with a shared multimodal usage bar (text + image + audio + video + music share one quota). It is the same family of plans the MiniMax integration guide for Cursor, Claude Code, Zed, Kilo Code, and other IDEs targets — and the _same_ `https://api.minimax.io/v1/chat/completions` endpoint with the _same_ `MiniMax-M3` model id is used. The only field that changes between PAYG and Token Plan is the API key in `${input:chat.lm.secret.<id>}`.
149
+ The Token Plan is a **monthly or annual** subscription with a shared multimodal usage bar (text + image + audio + video + music share one quota).
195
150
 
196
151
  | Tier | Price | Best for | Quota window | Typical agent capacity |
197
152
  | ----- | --------- | -------------------------------------------- | ----------------------- | ---------------------- |
@@ -202,100 +157,3 @@ The Token Plan is a **monthly or annual** subscription with a shared multimodal
202
157
  Annual billing is available; unused subscription quota does **not** roll over to the next cycle. Credits are sold separately (`$5` = 5,000 / `$25` = 25,000 / `$100` = 100,000; 365-day validity) and use the same Subscription Key — when the included Token Plan quota is exhausted, purchased Credits automatically cover eligible overflow within Token Plan resource coverage. Subscription quota is consumed first, Credits second.
203
158
 
204
159
  > The Token Plan is intended for **individual, interactive developer use**, not production. MiniMax recommends PAYG for production workloads. Peak-hour dynamic rate-limiting may apply (typically 15:00–17:30 weekdays, per the [Token Plan platform-traffic rules](https://platform.minimax.io/docs/token-plan/faq#token-plan-limit-rules)). For background, see the [Token Plan overview](https://platform.minimax.io/docs/token-plan/intro) and the [subscription pricing page](https://platform.minimax.io/docs/guides/pricing-token-plan).
205
- >
206
- > **Source for the same-config claim:** the Token Plan docs show `https://api.minimax.io/v1` + model id `MiniMax-M3` for the OpenAI-compatible path and `https://api.minimax.io/anthropic` for the Anthropic-compatible path, with the same request body fields the PAYG path uses — see [Other Tools › Configuration Reference](https://platform.minimax.io/docs/token-plan/other-tools#configuration-reference). The FAQ explicitly says: _"Can the Subscription Key and the standard Open Platform API Key be used interchangeably? No, they cannot."_ — the **keys are not swappable, but the endpoint, model id, and `requestBody` are.**
207
-
208
- ---
209
-
210
- ## Background & Findings
211
-
212
- > This appendix preserves the validation narrative for future reference. It is not required to use the model.
213
-
214
- ### The `thinking` parameter is a soft hint
215
-
216
- The `thinking: { "type": "disabled" }` parameter does **not** suppress `<think>` tags or `reasoning_content` in responses — the model always reasons internally. The setting is a layout hint, not a behavioral override.
217
-
218
- This is the key insight behind the recommended config:
219
-
220
- - `thinking: { type: "adaptive" }` lets the model decide when to reason (which is "always" in practice).
221
- - `reasoning_split: true` tells the server to put the reasoning into a structured `reasoning_details` field, keeping `content` clean for VS Code.
222
-
223
- If you have an older config that uses `disabled` (e.g., to mirror the MiMo convention), it will still work — the difference vs `adaptive` is purely cosmetic (response field layout). The model remains stable in 3-turn tool loops under both settings.
224
-
225
- ### Architecture
226
-
227
- - **Model:** MiniMax-M3 (multimodal frontier coding model).
228
- - **Architecture:** Novel MiniMax Sparse Attention (MSA) — designed for 1M context with low latency.
229
- - **Training:** Native multimodal training from step zero with 100T+ data, deep alignment between textual and visual semantic spaces.
230
-
231
- ### Validation results (June 3, 2026)
232
-
233
- #### Phase 1 — Connectivity check
234
-
235
- | Check | Result | Notes |
236
- | ------------------ | ------ | ------------------------------------------------------------------------------------- |
237
- | Non-streaming chat | ✅ | Model responded with `<think>` reasoning + greeting content |
238
- | Streaming (SSE) | ✅ | Chunks arrive as `data: {...}` with incremental `delta.content` and `delta.reasoning` |
239
- | Tool calling | ✅ | `finish_reason: "tool_calls"` with `get_weather({"location": "San Francisco"})` |
240
- | Vision | ✅ | Correctly identified Google logo colors (blue, red, yellow, green) from PNG URL |
241
-
242
- **Key Phase 1 finding:** `thinking: {"type": "disabled"}` does not suppress reasoning — the model still emits `<think>` tags and `reasoning_content`. This is why the recommended config uses `adaptive` + `reasoning_split: true`.
243
-
244
- #### Phase 2 — VS Code in-editor validation
245
-
246
- The Copilot Chat panel in the validation session was running on `MiniMax M3`, making every response a live test.
247
-
248
- | Step | Result | Evidence |
249
- | --------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------- |
250
- | Add config to `chatLanguageModels.json` | ✅ | `MiniMax M3` appears in the model picker |
251
- | Open VS Code and select the model | ✅ | Screenshot confirms "MiniMax M3" selected |
252
- | Plain chat | ✅ | Coherent answer to "What do you mean by streaming in this context?" |
253
- | Streaming | ✅ | Text appeared progressively in the chat panel |
254
- | Tool calling (agent mode) | ✅ | `open_browser_page` invoked successfully → "Google" page title confirmed |
255
- | Vision | ✅ | Facebook screenshot analyzed in detail (10 tabs, sidebar items, post content, birthdays, Reels section) |
256
-
257
- #### Phase 3 — Multi-turn tool loop test
258
-
259
- Asked the model to inspect a YouTube video (`https://www.youtube.com/watch?v=rAzT5lcezPs`) using videoMcp tools. The model chained three tool calls:
260
-
261
- | # | Tool | Result |
262
- | --- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
263
- | 1 | `mcp_videomcp_get_video_info` | ✅ 17 min 6 sec, 1280×720 @ 30 fps, h264, 96 MB |
264
- | 2 | `mcp_videomcp_analyze_video` (Gemini backend) | ✅ Identified presenter (PewDiePie), topic (Odysseus — local self-hosted AI workspace), key features, sponsors |
265
- | 3 | `mcp_videomcp_transcribe_video` (Deepgram) | ✅ 17 KB transcript written to file |
266
-
267
- **Findings:**
268
-
269
- - ✅ All three tool calls succeeded without errors.
270
- - ✅ Model chained calls logically (metadata → analysis → transcript) rather than asking the user to re-prompt.
271
- - ✅ Each tool result was incorporated into subsequent reasoning.
272
- - ✅ No `<think>` tag or `reasoning_content` degradation observed mid-conversation — the multi-turn loop did not visibly break the model, contradicting the original Phase 1 worry that `<think>` tags would cause problems.
273
-
274
- #### Phase 4 — Long-context test
275
-
276
- **Skipped.** The 1M context claim is well-supported by MiniMax's published benchmarks, and the curl test in Phase 1 confirmed single-turn support for multi-KB prompts. The long-context pressure-test is deferred until a real workload requires it.
277
-
278
- ### Final verdict
279
-
280
- - Acceptable for plain chat: **yes**
281
- - Acceptable for streaming chat: **yes**
282
- - Acceptable for tool-enabled agent use: **yes**
283
- - Acceptable for vision: **yes**
284
- - Acceptable without a proxy: **yes**
285
-
286
- ## References
287
-
288
- - MiniMax Official Website: `https://www.minimax.io/`
289
- - MiniMax API Documentation: `https://platform.minimax.io/docs/guides/models-intro`
290
- - MiniMax M3 Model Page: `https://www.minimax.io/models/text/m3`
291
- - MiniMax Text Generation Guide: `https://platform.minimax.io/docs/guides/text-generation`
292
- - MiniMax Tool Use & Interleaved Thinking: `https://platform.minimax.io/docs/guides/text-m3-function-call`
293
- - MiniMax Pricing: `https://platform.minimax.io/docs/pricing/overview`
294
- - MiniMax Pay as You Go: `https://platform.minimax.io/docs/guides/pricing-paygo`
295
- - MiniMax Token Plan: `https://platform.minimax.io/docs/guides/pricing-token-plan`
296
- - MiniMax Token Plan Overview: `https://platform.minimax.io/docs/token-plan/intro`
297
- - MiniMax Token Plan Quickstart: `https://platform.minimax.io/docs/token-plan/quickstart`
298
- - MiniMax Token Plan FAQ (key interchangeability, quota windows, platform limits): `https://platform.minimax.io/docs/token-plan/faq`
299
- - MiniMax Token Plan — Other Tools configuration reference (same endpoint + model id for PAYG and Token Plan): `https://platform.minimax.io/docs/token-plan/other-tools#configuration-reference`
300
- - MiniMax Rate Limits: `https://platform.minimax.io/docs/guides/rate-limits`
301
- - MiniMax M3 for AI Coding Tools: `https://platform.minimax.io/docs/guides/text-ai-coding-tools`