copilot-custom-endpoint 1.7.3 → 1.7.5

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.
@@ -124,23 +124,6 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
124
124
  "temperature": 1,
125
125
  "top_p": 0.95
126
126
  }
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
127
  }
145
128
  ]
146
129
  },
@@ -20,8 +20,8 @@
20
20
  | Billing | **Pay-as-You-Go** (PaaS API) — Coding Plan subscription exists but is **not usable** from VS Code custom endpoints |
21
21
  | Vision | ✅ Yes (`glm-5v-turbo` only) |
22
22
  | Tool calling | ✅ Yes (native multimodal tool use on `glm-5v-turbo`) |
23
- | Context (flagship) | 1M (`glm-5.2` Solid Lossless Context) |
24
- | Max output (flagship) | 131072 |
23
+ | Context | 1M (`glm-5.2` Solid Lossless Context) |
24
+ | Max output | 131072 |
25
25
  | Required `requestBody` | `thinking: { type: "enabled" }` (recommended) |
26
26
  | Endpoint (intl) | `https://api.z.ai/api/paas/v4/chat/completions` |
27
27
  | Endpoint (China) | `https://open.bigmodel.cn/api/paas/v4/chat/completions` |
@@ -29,11 +29,11 @@
29
29
 
30
30
  ### Models
31
31
 
32
- | Model | Vision | Context | Max output | Thinking | Cost (in / out per 1M) | Role |
33
- | -------------- | ------ | ------- | ---------- | --------- | ---------------------- | ---------------------------------------------------------------------------------------- |
34
- | `glm-5.2` | ❌ | 1M | 131072 | `enabled` | $1.40 / $4.40 | New Flagship — "Opus-level" long-context engineering, agentic coding, and deep reasoning |
35
- | `glm-5.1` | ❌ | 200K | 131072 | `enabled` | $1.40 / $4.40 | Previous flagship — long-horizon / 8h autonomous work |
36
- | `glm-5v-turbo` | ✅ | 200K | 131072 | `enabled` | $1.20 / $4.00 | Multimodal **coding** model — vision-based agentic coding |
32
+ | Model | Vision | Context | Max output | Notes |
33
+ | -------------- | ------ | ------- | ---------- | ---------------------------------------------------------------------------------------------------------------- |
34
+ | `glm-5.2` | ❌ | 1M | 131072 | New Flagship — "Opus-level" long-context engineering & agentic coding; thinking `enabled` ($1.40 / $4.40 per 1M) |
35
+ | `glm-5.1` | ❌ | 200K | 131072 | Previous flagship — long-horizon / 8h autonomous work; thinking `enabled` ($1.40 / $4.40 per 1M) |
36
+ | `glm-5v-turbo` | ✅ | 200K | 131072 | Multimodal **coding** model — vision-based agentic coding; thinking `enabled` ($1.20 / $4.00 per 1M) |
37
37
 
38
38
  > Other GLM models (`glm-5`, `glm-5-turbo`, `glm-4.5-air`, etc.) are callable on the same endpoint but are intentionally **not** added to the default `chatLanguageModels.json` block below. Add them in the same shape if you need them. Note: `glm-4.6v-flashx` was previously in the default block but has been **removed** because live testing showed it is not reliable for tool calling.
39
39
 
@@ -1,4 +1,4 @@
1
- # Kimi — VS Code Custom Endpoint Setup Guide
1
+ # Kimi (Moonshot) — VS Code Custom Endpoint Setup Guide
2
2
 
3
3
  > **TL;DR:** Kimi models require the local proxy. The K2 family locks `temperature: 1` and `top_p: 0.95`. K2.6 needs `thinking: { type: "disabled" }` on tool turns; **K2.7 Code is always-thinking and rejects `thinking: disabled`**, so the proxy detects `kimi-k2.7*` and skips that rewrite while keeping sampling enforcement. Direct VS Code → Moonshot is not viable.
4
4
  >
@@ -6,21 +6,24 @@
6
6
 
7
7
  ## At a Glance
8
8
 
9
- | Field | Value |
10
- | ----------------- | --------------------------------------------- |
11
- | Mode | **Proxy required** (local on `:3457`) |
12
- | Billing | **Pay-as-You-Go only** — no subscription |
13
- | Vision | ✅ Yes |
14
- | Tool calling | ✅ Yes |
15
- | Upstream endpoint | `https://api.moonshot.ai/v1/chat/completions` |
16
- | Proxy endpoint | `http://127.0.0.1:3457/v1/chat/completions` |
9
+ | Field | Value |
10
+ | -------------- | --------------------------------------------- |
11
+ | Mode | **Proxy required** (local on `:3457`) |
12
+ | Billing | **Pay-as-You-Go only** — no subscription |
13
+ | Vision | ✅ Yes |
14
+ | Tool calling | ✅ Yes |
15
+ | Context | _see Models table_ |
16
+ | Max output | _see Models table_ |
17
+ | Endpoint | `https://api.moonshot.ai/v1/chat/completions` |
18
+ | Proxy endpoint | `http://127.0.0.1:3457/v1/chat/completions` |
19
+ | Auth | `Authorization: Bearer $KIMI_API_KEY` |
17
20
 
18
21
  ### Models
19
22
 
20
- | Model id | Context | Max output | Notes |
21
- | ---------------- | ------- | ---------- | --------------------------------------------------------------------------------- |
22
- | `kimi-k2.6` | 262K | 32768 | Proxy forces `thinking: { type: "disabled" }` on tool turns |
23
- | `kimi-k2.7-code` | 262K | 4096 | Always-thinking; rejects `thinking: disabled`. Keep `maxOutputTokens` low (4096). |
23
+ | Model | Vision | Context | Max output | Notes |
24
+ | ---------------- | ------ | ------- | ---------- | --------------------------------------------------------------------------------- |
25
+ | `kimi-k2.6` | ✅ Yes | 262K | 32768 | Proxy forces `thinking: { type: "disabled" }` on tool turns |
26
+ | `kimi-k2.7-code` | ✅ Yes | 262K | 4096 | Always-thinking; rejects `thinking: disabled`. Keep `maxOutputTokens` low (4096). |
24
27
 
25
28
  > Deprecated K2 ids (`kimi-k2-0905-preview`, `kimi-k2-turbo-preview`, `kimi-k2-thinking`, etc.) were discontinued May 25, 2026 — use K2.6 or K2.7.
26
29
 
@@ -87,7 +90,9 @@ Kimi is **Pay-as-You-Go only** — no subscription. A single Open Platform API k
87
90
 
88
91
  > VS Code replaces `"apiKey": ""` with a `${input:chat.lm.secret.<id>}` reference. Kimi Platform (formerly Moonshot) rebranded to `platform.kimi.ai` in 2026 — `api.moonshot.ai` still resolves and the proxy targets it unchanged.
89
92
 
90
- ### 3. Local proxy
93
+ ## Local Proxy
94
+
95
+ The `proxy/kimi-proxy.mjs` is **required** for Kimi — K2-family sampling constraints and tool-turn thinking behaviour cannot be satisfied by VS Code's direct path. See [Quick Start](#quick-start) for the launch command.
91
96
 
92
97
  | Setting | Value |
93
98
  | ------------ | ----------------------------------------------------- |
@@ -97,7 +102,7 @@ Kimi is **Pay-as-You-Go only** — no subscription. A single Open Platform API k
97
102
  | Start | `npm run proxy:kimi` (or `node proxy/kimi-proxy.mjs`) |
98
103
  | Help | `node proxy/kimi-proxy.mjs --help` |
99
104
 
100
- #### Environment variables
105
+ ### Environment variables
101
106
 
102
107
  Set in `.env` at the repo root (the proxy `import 'dotenv/config'` automatically).
103
108
 
@@ -111,7 +116,7 @@ Set in `.env` at the repo root (the proxy `import 'dotenv/config'` automatically
111
116
  | `KIMI_PROXY_DISABLE_THINKING_WITH_TOOLS` | `1` | Force `thinking={"type":"disabled"}` when tools present |
112
117
  | `KIMI_PROXY_LOG` | `debug_log/kimi-proxy.ndjson` | Redacted NDJSON log path |
113
118
 
114
- #### What the proxy does
119
+ ### What the proxy does
115
120
 
116
121
  - Forwards your `Authorization` header upstream.
117
122
  - Rewrites plain-chat requests to `temperature: 1`, `top_p: 0.95`.
@@ -120,6 +125,12 @@ Set in `.env` at the repo root (the proxy `import 'dotenv/config'` automatically
120
125
  - Preserves streaming responses (SSE).
121
126
  - Writes redacted request summaries to `debug_log/kimi-proxy.ndjson`.
122
127
 
128
+ ## Notes
129
+
130
+ - **K2.7 Code** is always-thinking. `max_tokens` and `maxOutputTokens` are intentionally conservative at **4096** — reasoning tokens inflate response size and values above 24K triggered VS Code's "Response too long" error in agent mode.
131
+ - **K2 platform rebranding:** the Kimi Platform (formerly Moonshot) rebranded to `platform.kimi.ai` in 2026 — `api.moonshot.ai` still resolves and the proxy targets it unchanged.
132
+ - **`tool_choice` only supports `auto`** — don't override it (VS Code's default is `auto`).
133
+
123
134
  ## Troubleshooting
124
135
 
125
136
  | Symptom | Likely cause | Fix |
@@ -1,4 +1,4 @@
1
- # Xiaomi MiMo — VS Code Copilot Chat Setup Guide
1
+ # Xiaomi MiMo — VS Code Custom Endpoint Setup Guide
2
2
 
3
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.
4
4
 
@@ -8,19 +8,23 @@
8
8
  | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
9
9
  | **Recommended method** | **[Xiaomi MiMo for Copilot Chat](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot)** VS Code extension |
10
10
  | Alternative methods | Direct API (static `thinking: disabled`) or `proxy/mimo-proxy.mjs` (dynamic suppression) |
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`) |
11
13
  | Vision | ✅ Yes (`mimo-v2.5` only) |
12
14
  | Tool calling | ✅ Yes (with thinking disabled, OR thinking enabled via the extension's reasoning cache) |
13
15
  | Context | 917K (extension) / 1M (custom endpoint) |
14
16
  | Max output | 131072 (V2.5 Pro) / 32768 (V2.5) |
15
- | Dependencies | Extension: **none**. Proxy method: Node.js + `proxy/mimo-proxy.mjs` |
17
+ | Endpoint | `https://api.xiaomimimo.com/v1/chat/completions` |
18
+ | Proxy endpoint | `http://127.0.0.1:3459/v1/chat/completions` |
19
+ | Auth | `Authorization: Bearer $MIMO_API_KEY` |
16
20
 
17
21
  ### Models
18
22
 
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 |
23
+ | Model | Vision | Context | Max output | Notes |
24
+ | -------------------------- | ------ | ------- | --------------- | --------------------------------------------------------------------- |
25
+ | `mimo-v2.5-pro-ultraspeed` | ❌ | 917K | _(unspecified)_ | Fast Pro reasoning for latency-sensitive agent tasks (extension only) |
26
+ | `mimo-v2.5-pro` | ❌ | 917K | 131072 | Flagship text-only — best for deep reasoning |
27
+ | `mimo-v2.5` | ✅ | 917K | 32768 | Omnimodal — text + image + video + audio |
24
28
 
25
29
  > `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`.
26
30
 
@@ -189,6 +193,20 @@ Token Plan subscribers use different base URLs and `tp-` prefixed keys from pay-
189
193
 
190
194
  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.
191
195
 
196
+ ## Local Proxy
197
+
198
+ The `proxy/mimo-proxy.mjs` (optional) provides dynamic thinking suppression: reasoning stays ON in plain chat but turns OFF automatically when tools are invoked. If you don't mind thinking being off on every turn, the direct path is simpler. If you want the agent reasoning cache, use the extension (recommended above).
199
+
200
+ | Setting | Value |
201
+ | ------------ | ----------------------------------------------------- |
202
+ | Script | `proxy/mimo-proxy.mjs` |
203
+ | Listen URL | `http://127.0.0.1:3459/v1/chat/completions` |
204
+ | Health check | `curl http://127.0.0.1:3459/healthz` |
205
+ | Start | `npm run proxy:mimo` (or `node proxy/mimo-proxy.mjs`) |
206
+ | Help | `node proxy/mimo-proxy.mjs --help` |
207
+
208
+ 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 it dynamically.
209
+
192
210
  ## Notes
193
211
 
194
212
  - **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.
@@ -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](#5-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
  >
@@ -15,19 +15,24 @@
15
15
 
16
16
  ## At a Glance
17
17
 
18
- | Field | Value |
19
- | ------------------------ | ------------------------------------------------------------------------ |
20
- | Mode | **Direct** (no proxy) |
21
- | Billing | **Pay-as-You-Go** _or_ **Token Plan subscription** (same config) |
22
- | Vision | ✅ Yes (image + video) |
23
- | Tool calling | ✅ Yes |
24
- | Context | 1M (guaranteed 512K) |
25
- | Max output | 131072 |
26
- | Required `requestBody` | `thinking: { type: "adaptive" }, reasoning_split: true` |
27
- | Endpoint (international) | `https://api.minimax.io/v1/chat/completions` |
28
- | Endpoint (China) | `https://api.minimaxi.com/v1/chat/completions` |
29
- | API key (PAYG) | Open Platform API Key from `user-center/basic-information/interface-key` |
30
- | API key (Token Plan) | **Subscription Key** (`sk-cp-…`) from `user-center/payment/token-plan` |
18
+ | Field | Value |
19
+ | ------------------------ | ----------------------------------------------------------------------------------- |
20
+ | Mode | **Direct** (no proxy) |
21
+ | Billing | **Pay-as-You-Go** _or_ **Token Plan subscription** (same config) |
22
+ | Vision | ✅ Yes (image + video) |
23
+ | Tool calling | ✅ Yes |
24
+ | Context | 1M (guaranteed 512K) |
25
+ | Max output | 131072 |
26
+ | Required `requestBody` | `thinking: { type: "adaptive" }, reasoning_split: true` |
27
+ | Endpoint (international) | `https://api.minimax.io/v1/chat/completions` |
28
+ | Endpoint (China) | `https://api.minimaxi.com/v1/chat/completions` |
29
+ | Auth | `Authorization: Bearer $MINIMAX_API_KEY` (or Subscription Key, see [Setup](#setup)) |
30
+
31
+ ### Models
32
+
33
+ | Model | Vision | Context | Max output | Notes |
34
+ | ------------ | ------ | ------- | ---------- | -------------------------------------------------------------------------------------- |
35
+ | `MiniMax-M3` | ✅ Yes | 1M | 131072 | Multimodal frontier coding model; adaptive reasoning; PAYG and Token Plan share config |
31
36
 
32
37
  ## Quick Start
33
38
 
@@ -37,6 +42,15 @@
37
42
 
38
43
  ## Setup
39
44
 
45
+ ### Regional endpoints
46
+
47
+ > 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`.
48
+
49
+ | Region | Endpoint |
50
+ | ------------- | ---------------------------------------------- |
51
+ | International | `https://api.minimax.io/v1/chat/completions` |
52
+ | China | `https://api.minimaxi.com/v1/chat/completions` |
53
+
40
54
  ### 1. VS Code configuration
41
55
 
42
56
  | OS | Path |
@@ -106,68 +120,37 @@ The same `chatLanguageModels.json` block above is reused unchanged. Only the sec
106
120
 
107
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.
108
122
 
109
- ### 4. Regional endpoints
110
-
111
- | Region | Endpoint |
112
- | ------------- | ---------------------------------------------- |
113
- | International | `https://api.minimax.io/v1/chat/completions` |
114
- | China | `https://api.minimaxi.com/v1/chat/completions` |
115
-
116
- > 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`.
117
-
118
- ### 5. M3 Priority tier (optional)
123
+ ### 4. M3 Priority tier (optional)
119
124
 
120
125
  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.
121
126
 
122
- 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`:
127
+ **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.
128
+
129
+ To switch the existing entry from Standard to Priority, add one line to `requestBody`:
123
130
 
124
131
  ```json
125
132
  {
126
- "name": "MiniMax",
127
- "vendor": "customendpoint",
128
- "apiKey": "",
129
- "apiType": "chat-completions",
130
- "models": [
131
- {
132
- "id": "MiniMax-M3",
133
- "name": "MiniMax M3 (Standard)",
134
- "url": "https://api.minimax.io/v1/chat/completions",
135
- "toolCalling": true,
136
- "vision": true,
137
- "streaming": true,
138
- "maxInputTokens": 1048576,
139
- "maxOutputTokens": 131072,
140
- "requestBody": {
141
- "thinking": { "type": "adaptive" },
142
- "reasoning_split": true,
143
- "temperature": 1,
144
- "top_p": 0.95
145
- }
146
- },
147
- {
148
- "id": "MiniMax-M3-Priority",
149
- "name": "MiniMax M3 (Priority)",
150
- "url": "https://api.minimax.io/v1/chat/completions",
151
- "toolCalling": true,
152
- "vision": true,
153
- "streaming": true,
154
- "maxInputTokens": 1048576,
155
- "maxOutputTokens": 131072,
156
- "requestBody": {
157
- "thinking": { "type": "adaptive" },
158
- "reasoning_split": true,
159
- "temperature": 1,
160
- "top_p": 0.95,
161
- "service_tier": "priority"
162
- }
163
- }
164
- ]
133
+ "id": "MiniMax-M3",
134
+ "name": "MiniMax M3 (Priority)",
135
+ "url": "https://api.minimax.io/v1/chat/completions",
136
+ "toolCalling": true,
137
+ "vision": true,
138
+ "streaming": true,
139
+ "maxInputTokens": 1048576,
140
+ "maxOutputTokens": 131072,
141
+ "requestBody": {
142
+ "thinking": { "type": "adaptive" },
143
+ "reasoning_split": true,
144
+ "temperature": 1,
145
+ "top_p": 0.95,
146
+ "service_tier": "priority"
147
+ }
165
148
  }
166
149
  ```
167
150
 
168
- Or, if you only ever want Priority, add `"service_tier": "priority"` to the single `MiniMax-M3` entry from step 1.
151
+ 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.
169
152
 
170
- > 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.
153
+ > 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.
171
154
 
172
155
  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).
173
156
 
@@ -4,35 +4,39 @@
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.7-plus`) |
12
- | Tool calling | ✅ Yes |
13
- | Context | 1M |
14
- | Required `requestBody` (direct) | `enable_thinking: false` |
15
- | Required `requestBody` (proxy) | none — proxy injects based on tool activity |
16
- | Endpoint | `https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions` |
17
- | Proxy endpoint | `http://127.0.0.1:3458/v1/chat/completions` |
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.7-plus`) |
12
+ | Tool calling | ✅ Yes |
13
+ | Context | 1M |
14
+ | Max output | _see Models table_ |
15
+ | Endpoint | `https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions` |
16
+ | Proxy endpoint | `http://127.0.0.1:3458/v1/chat/completions` |
17
+ | Auth | `Authorization: Bearer $DASHSCOPE_API_KEY` |
18
+ | `requestBody` (direct) | `enable_thinking: false` |
19
+ | `requestBody` (proxy) | _none — proxy injects based on tool activity_ |
18
20
 
19
21
  ### Models
20
22
 
21
- | Model | Vision | Role |
22
- | -------------- | ------ | -------------------------------------- |
23
- | `qwen3.7-plus` | ✅ Yes | Primary model with image understanding |
24
- | `qwen3.7-max` | ❌ No | Larger text-only model |
23
+ | Model | Vision | Context | Max output | Notes |
24
+ | -------------- | ------ | ------- | --------------- | -------------------------------------- |
25
+ | `qwen3.7-plus` | ✅ Yes | 1M | _(unspecified)_ | Primary model with image understanding |
26
+ | `qwen3.7-max` | ❌ No | 1M | _(unspecified)_ | Larger text-only model |
25
27
 
26
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.
27
29
 
28
- ## Quick Start — With Proxy (recommended)
30
+ ## Quick Start
31
+
32
+ ### With Proxy (recommended)
29
33
 
30
34
  1. **Start the proxy:** `npm run proxy:qwen` (or `npx copilot-custom-endpoint qwen`).
31
35
  2. **Use the proxy-path JSON snippet** below.
32
36
  3. **Set your DashScope API key** via Command Palette → **Chat: Manage Language Models**.
33
37
  4. **Restart VS Code.** Reasoning will be visible in plain chat and suppressed on tool turns.
34
38
 
35
- ## Quick Start — Direct (no proxy)
39
+ ### Direct (no proxy)
36
40
 
37
41
  1. **Use the direct-path JSON snippet** below.
38
42
  2. **Set your `DASHSCOPE_API_KEY`** via Command Palette → **Chat: Manage Language Models**.
@@ -134,11 +138,34 @@ DashScope is region-specific — your API key only works on the endpoint it was
134
138
  }
135
139
  ```
136
140
 
137
- > **Keep the proxy terminal open** while using Qwen via proxy.
141
+ > **Keep the proxy terminal open** while using Qwen via proxy. Configuration knobs are documented in [Local Proxy](#local-proxy) below.
142
+
143
+ ### 2. API key
144
+
145
+ DashScope is **Pay-as-You-Go only** — but new Model Studio users get **1M input + 1M output tokens per model free for 90 days**. Prepaid token packages are also available.
146
+
147
+ 1. Open the Command Palette (`Ctrl+Shift+P`).
148
+ 2. Run **Chat: Manage Language Models**.
149
+ 3. Find the **Qwen** group → **Update API Key**.
150
+ 4. Paste your DashScope API key.
151
+
152
+ > VS Code replaces `"apiKey": ""` with a `${input:chat.lm.secret.<id>}` reference. Keys are region-specific.
138
153
 
139
- #### Proxy environment variables
154
+ ## Local Proxy
140
155
 
141
- Set in `.env` at the repo root.
156
+ The `proxy/qwen-proxy.mjs` adds dynamic thinking suppression on top of the direct integration. Reasoning stays ON in plain chat and turns OFF automatically only when tools are invoked. If you don't need reasoning visibility, the direct path (`### Direct (no proxy)` above) is simpler.
157
+
158
+ | Setting | Value |
159
+ | ------------ | ----------------------------------------------------- |
160
+ | Script | `proxy/qwen-proxy.mjs` |
161
+ | Listen URL | `http://127.0.0.1:3458/v1/chat/completions` |
162
+ | Health check | `curl http://127.0.0.1:3458/healthz` |
163
+ | Start | `npm run proxy:qwen` (or `node proxy/qwen-proxy.mjs`) |
164
+ | Help | `node proxy/qwen-proxy.mjs --help` |
165
+
166
+ ### Environment variables
167
+
168
+ Set in `.env` at the repo root (the proxy `import 'dotenv/config'` automatically).
142
169
 
143
170
  | Variable | Default | Purpose |
144
171
  | ---------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------- |
@@ -147,7 +174,7 @@ Set in `.env` at the repo root.
147
174
  | `QWEN_PROXY_LOG` | `debug_log/qwen-proxy.ndjson` | Redacted NDJSON log path |
148
175
  | `QWEN_PROXY_DISABLE_THINKING_WITH_TOOLS` | `1` | Set to `0` to skip tool-aware thinking suppression |
149
176
 
150
- #### What the proxy does
177
+ ### What the proxy does
151
178
 
152
179
  The proxy detects active tool use by examining the conversation state (a `"tool"`-role message in history or a non-default `tool_choice`), not just the presence of a `tools` array. This correctly handles tool-enabled conversations even when the client sends `tools` in an earlier request but omits it from subsequent turns.
153
180
 
@@ -156,16 +183,13 @@ The proxy detects active tool use by examining the conversation state (a `"tool"
156
183
  | Tool-role message in history **or** non-default `tool_choice` | Inject `enable_thinking: false` |
157
184
  | Plain chat (no tool activity) | Delete `enable_thinking` (default ON) |
158
185
 
159
- ### 2. API key
160
-
161
- DashScope is **Pay-as-You-Go only** — but new Model Studio users get **1M input + 1M output tokens per model free for 90 days**. Prepaid token packages are also available.
186
+ ### Forwards header & streaming
162
187
 
163
- 1. Open the Command Palette (`Ctrl+Shift+P`).
164
- 2. Run **Chat: Manage Language Models**.
165
- 3. Find the **Qwen** group → **Update API Key**.
166
- 4. Paste your DashScope API key.
188
+ - Forwards your `Authorization` header upstream unchanged.
189
+ - Preserves streaming responses (SSE).
190
+ - Writes redacted request summaries to `debug_log/qwen-proxy.ndjson`.
167
191
 
168
- > VS Code replaces `"apiKey": ""` with a `${input:chat.lm.secret.<id>}` reference. Keys are region-specific.
192
+ > **Keep the proxy terminal open** while using Qwen via proxy.
169
193
 
170
194
  ## Notes
171
195
 
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.3",
3
+ "version": "1.7.5",
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",