copilot-custom-endpoint 1.5.7 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/docs/models/glm.md +64 -85
- package/docs/models/mimo.md +4 -4
- package/docs/pricing.md +6 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -28,6 +28,7 @@ That's it. No code, no servers to manage (unless the model specifically needs th
|
|
|
28
28
|
| **Qwen 3.7 Plus** | DashScope | Optional (recommended) | ✅ | [Setup](docs/models/qwen.md) |
|
|
29
29
|
| **Qwen 3.7 Max** | DashScope | Optional (recommended) | ❌ | [Setup](docs/models/qwen.md) |
|
|
30
30
|
| **MiniMax M3** | MiniMax | No | ✅ | [Setup](docs/models/minimax.md) |
|
|
31
|
+
| **GLM 5.2** | Z.ai | No | ❌ | [Setup](docs/models/glm.md) |
|
|
31
32
|
| **GLM 5.1** | Z.ai | No | ❌ | [Setup](docs/models/glm.md) |
|
|
32
33
|
| **GLM 5V Turbo** | Z.ai | No | ✅ | [Setup](docs/models/glm.md) |
|
|
33
34
|
| **DeepSeek V4 Pro / Flash** | DeepSeek | No (uses an extension) | ✅ via proxy | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Vizards.deepseek-v4-for-copilot) |
|
|
@@ -99,10 +100,13 @@ All prices are **USD per 1M tokens** (non-cached). 1 AI credit = $0.01. To conve
|
|
|
99
100
|
| **DeepSeek V4 Pro** | DeepSeek | **~$0.0068** | **44.3** | ~$0.30 | ✅ | 1M |
|
|
100
101
|
| **Qwen 3.7 Plus** | DashScope | **~$0.0092** | **39.0** | ~$0.36 | ✅ | 1M |
|
|
101
102
|
| **MiMo V2.5 Pro** | Xiaomi | **~$0.019** | **42.2** | ~$0.80 | ❌ | 1M |
|
|
103
|
+
| **Gemini 3 Flash** | Google | **~$0.020** | **27.0** ³ | ~$0.55 | ✅ | 173K |
|
|
102
104
|
| **Kimi K2.6** | Moonshot | **~$0.021** | **42.8** | ~$0.88 | ✅ | 262K |
|
|
103
105
|
| **Kimi K2.7 Code** | Moonshot | **~$0.021** | **42.0** | ~$0.88 | ✅ | 262K |
|
|
104
106
|
| **GPT-5.4 mini** | OpenAI | **~$0.021** | **40.0** | ~$0.83 | ❌ | 400K |
|
|
107
|
+
| **GLM 5.2** | Z.ai | **~$0.022** | **51.0** | ~$1.14 | ❌ | 1M |
|
|
105
108
|
| **GLM 5.1** | Z.ai | **~$0.028** | **40.2** | ~$1.14 | ❌ | 200K |
|
|
109
|
+
| **GLM 5V Turbo** | Z.ai | **~$0.029** | **34.0** ³ | ~$1.00 | ✅ | 200K |
|
|
106
110
|
| **Gemini 3.5 Flash** | Google | **~$0.033** | **50.2** | ~$1.65 | ✅ | 1M |
|
|
107
111
|
| **Qwen 3.7 Max** | DashScope | **~$0.043** | **46.0** | ~$2.00 | ❌ | 1M |
|
|
108
112
|
| **Gemini 3.1 Pro** | Google | **~$0.047** | **46.5** | ~$2.20 | ✅ | 1M |
|
|
@@ -114,9 +118,7 @@ All prices are **USD per 1M tokens** (non-cached). 1 AI credit = $0.01. To conve
|
|
|
114
118
|
| **MiMo V2 Flash** | Xiaomi | — | — | ~$0.08 | ❌ | 256K |
|
|
115
119
|
| **Raptor mini** | GitHub | — | — | ~$0.33 | ❌ | 264K |
|
|
116
120
|
| **MiMo V2.5** | Xiaomi | — | — | ~$0.40 | ✅ | 1M |
|
|
117
|
-
| **
|
|
118
|
-
| **MAI-Code-1-Flash ²** | Microsoft | — | — | ~$0.83 | ❌ | — |
|
|
119
|
-
| **GLM 5V Turbo** | Z.ai | — | — | ~$1.00 | ✅ | 200K |
|
|
121
|
+
| **MAI-Code-1-Flash** ² | Microsoft | — | — | ~$0.83 | ❌ | — |
|
|
120
122
|
| **Claude Haiku 4.5** | Anthropic | — | — | ~$1.00 | ❌ | 160K |
|
|
121
123
|
| **GPT-5.3-Codex** | OpenAI | — | — | ~$2.28 | ❌ | 400K |
|
|
122
124
|
|
package/docs/models/glm.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| Mode | **Direct** (no proxy) |
|
|
10
10
|
| Vision | ✅ Yes (`glm-5v-turbo` only) |
|
|
11
11
|
| Tool calling | ✅ Yes (native multimodal tool use on `glm-5v-turbo`) |
|
|
12
|
-
| Context (flagship) |
|
|
12
|
+
| Context (flagship) | 1M (`glm-5.2` Solid Lossless Context) |
|
|
13
13
|
| Max output (flagship) | 131072 |
|
|
14
14
|
| Required `requestBody` | `thinking: { type: "enabled" }` (recommended) |
|
|
15
15
|
| Endpoint (intl) | `https://api.z.ai/api/paas/v4/chat/completions` |
|
|
@@ -18,20 +18,21 @@
|
|
|
18
18
|
|
|
19
19
|
### Models at a glance
|
|
20
20
|
|
|
21
|
-
| Model | Vision | Context | Max output | Thinking | Cost (in / out per 1M) | Role
|
|
22
|
-
| -------------- | ------ | ------- | ---------- | --------- | ---------------------- |
|
|
23
|
-
| `glm-5.
|
|
24
|
-
| `glm-
|
|
21
|
+
| Model | Vision | Context | Max output | Thinking | Cost (in / out per 1M) | Role |
|
|
22
|
+
| -------------- | ------ | ------- | ---------- | --------- | ---------------------- | ---------------------------------------------------------------------------------------- |
|
|
23
|
+
| `glm-5.2` | ❌ | 1M | 131072 | `enabled` | $1.40 / $4.40 | New Flagship — "Opus-level" long-context engineering, agentic coding, and deep reasoning |
|
|
24
|
+
| `glm-5.1` | ❌ | 200K | 131072 | `enabled` | $1.40 / $4.40 | Previous flagship — long-horizon / 8h autonomous work |
|
|
25
|
+
| `glm-5v-turbo` | ✅ | 200K | 131072 | `enabled` | $1.20 / $4.00 | Multimodal **coding** model — vision-based agentic coding |
|
|
25
26
|
|
|
26
27
|
> Other GLM models — `glm-5`, `glm-5-turbo`, `glm-4.6v-flashx`, `glm-4.5`, `glm-4.5-air`, `glm-4.5-flash`, `glm-4.5-x`, `glm-4.5-airx`, `glm-4-32b-0414-128k` — 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.
|
|
27
28
|
|
|
28
29
|
## Quick Start
|
|
29
30
|
|
|
30
|
-
1. **
|
|
31
|
-
2. **Generate an API key** on the
|
|
31
|
+
1. **Verify your account** at [z.ai/model-api](https://z.ai/model-api) or [open.bigmodel.cn](https://open.bigmodel.cn) to ensure the flagship models are active under your plan.
|
|
32
|
+
2. **Generate an API key** on the API Keys page of the platform.
|
|
32
33
|
3. **Edit `chatLanguageModels.json`** — add the GLM block from [Setup](#setup) below.
|
|
33
34
|
4. **Set the API key** via Command Palette → **Chat: Manage Language Models** → right-click **GLM** → **Update API Key**.
|
|
34
|
-
5. **Restart VS Code** and
|
|
35
|
+
5. **Restart VS Code** and select a GLM model from the picker.
|
|
35
36
|
|
|
36
37
|
## Setup
|
|
37
38
|
|
|
@@ -45,6 +46,8 @@ Config file location:
|
|
|
45
46
|
| macOS | `~/Library/Application Support/Code/User/chatLanguageModels.json` |
|
|
46
47
|
| Linux | `~/.config/Code/User/chatLanguageModels.json` |
|
|
47
48
|
|
|
49
|
+
Modify your configuration:
|
|
50
|
+
|
|
48
51
|
```json
|
|
49
52
|
{
|
|
50
53
|
"name": "GLM",
|
|
@@ -52,6 +55,21 @@ Config file location:
|
|
|
52
55
|
"apiKey": "",
|
|
53
56
|
"apiType": "chat-completions",
|
|
54
57
|
"models": [
|
|
58
|
+
{
|
|
59
|
+
"id": "glm-5.2",
|
|
60
|
+
"name": "GLM 5.2 (1M Context)",
|
|
61
|
+
"url": "https://api.z.ai/api/paas/v4/chat/completions",
|
|
62
|
+
"toolCalling": true,
|
|
63
|
+
"vision": false,
|
|
64
|
+
"streaming": true,
|
|
65
|
+
"maxInputTokens": 1048576,
|
|
66
|
+
"maxOutputTokens": 131072,
|
|
67
|
+
"requestBody": {
|
|
68
|
+
"thinking": { "type": "enabled" },
|
|
69
|
+
"temperature": 1.0,
|
|
70
|
+
"top_p": 0.95
|
|
71
|
+
}
|
|
72
|
+
},
|
|
55
73
|
{
|
|
56
74
|
"id": "glm-5.1",
|
|
57
75
|
"name": "GLM 5.1 (text)",
|
|
@@ -87,8 +105,9 @@ Config file location:
|
|
|
87
105
|
```
|
|
88
106
|
|
|
89
107
|
> **Leave `apiKey` as `""`** — set it through the Language Models UI so VS Code stores it in the OS keychain (it will replace the empty string with a `${input:chat.lm.secret.<id>}` reference).
|
|
108
|
+
> If you signed up on `bigmodel.cn` (China), swap the `url` values in the block above to the regional endpoint `https://open.bigmodel.cn/api/paas/v4/chat/completions`.
|
|
90
109
|
|
|
91
|
-
|
|
110
|
+
<h3>2. API Key</h3>
|
|
92
111
|
|
|
93
112
|
1. Open the Command Palette (`Ctrl+Shift+P`).
|
|
94
113
|
2. Run **Chat: Manage Language Models**.
|
|
@@ -102,32 +121,29 @@ Config file location:
|
|
|
102
121
|
| **International** (default above) | `https://api.z.ai/api/paas/v4/chat/completions` | [z.ai/model-api](https://z.ai/model-api) — USD billing |
|
|
103
122
|
| China | `https://open.bigmodel.cn/api/paas/v4/chat/completions` | [open.bigmodel.cn](https://open.bigmodel.cn) — CNY billing |
|
|
104
123
|
|
|
105
|
-
> API keys are region-specific and **cannot** be used across regions. If you signed up on `bigmodel.cn` (China), swap the `url` values in the block above to the China endpoint — everything else is identical.
|
|
106
|
-
|
|
107
124
|
## Configuration Reference
|
|
108
125
|
|
|
109
126
|
### Sampling parameters
|
|
110
127
|
|
|
111
|
-
| Parameter | Range (hard cap) | Default
|
|
112
|
-
| ------------- | ---------------- |
|
|
113
|
-
| `temperature` | `[0.0, 1.0]` | `1.0` for GLM-
|
|
114
|
-
| `top_p` | `[0.01, 1.0]` | `0.95` for
|
|
115
|
-
| `do_sample` | bool | `true` — set `false` to bypass sampling
|
|
128
|
+
| Parameter | Range (hard cap) | Default / Recommended |
|
|
129
|
+
| ------------- | ---------------- | --------------------------------------- |
|
|
130
|
+
| `temperature` | `[0.0, 1.0]` | `1.0` for GLM-5.2 / 5.1 · `0.6` for 4.5 |
|
|
131
|
+
| `top_p` | `[0.01, 1.0]` | `0.95` for GLM 5.x |
|
|
132
|
+
| `do_sample` | bool | `true` — set `false` to bypass sampling |
|
|
116
133
|
|
|
117
|
-
> **Important:** Z.ai's `temperature` is capped at `1.0` server-side. Sending
|
|
134
|
+
> **Important:** Z.ai's `temperature` is capped at `1.0` server-side. Sending any value `> 1.0` will immediately reject with a 400.
|
|
118
135
|
|
|
119
136
|
### Thinking mode
|
|
120
137
|
|
|
121
138
|
`thinking` is a GLM-specific object. It only applies to **GLM-4.5 and above**.
|
|
122
139
|
|
|
123
|
-
| Field | Values | Default
|
|
124
|
-
| ------------------------- | ---------------------- |
|
|
125
|
-
| `thinking.type` | `enabled` / `disabled` | `enabled` for 5.
|
|
126
|
-
| `thinking.clear_thinking` | bool | **`true`**
|
|
140
|
+
| Field | Values | Default | Meaning |
|
|
141
|
+
| ------------------------- | ---------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
142
|
+
| `thinking.type` | `enabled` / `disabled` | `enabled` for 5.2/5.1/5-Turbo; hybrid for 4.6/4.5 | Force-enable or force-disable chain-of-thought. Hybrid lets the model decide. |
|
|
143
|
+
| `thinking.clear_thinking` | bool | **`true`** | When `true`, Z.ai **strips historical `reasoning_content` from prior turns** before sending to the model. |
|
|
127
144
|
|
|
128
145
|
> **Why the default is good for VS Code:** with `clear_thinking: true` (the server default), Z.ai doesn't require the client to forward `reasoning_content` between turns. VS Code's custom-endpoint provider doesn't preserve that field across tool turns — but for GLM it doesn't need to, because the server strips it. This avoids the same class of `reasoning_content` 400 errors that bite on MiMo.
|
|
129
|
-
>
|
|
130
|
-
> Set `clear_thinking: false` only if you are building a custom client that **does** forward `reasoning_content` verbatim. Do **not** set it from VS Code's `requestBody` — it would push GLM into a mode VS Code cannot satisfy.
|
|
146
|
+
> Do **not** set `clear_thinking: false` from VS Code's `requestBody` as it forces the client to feed `reasoning_content` back, which VS Code cannot satisfy.
|
|
131
147
|
|
|
132
148
|
| Mode in VS Code | Plain chat | Tool turns |
|
|
133
149
|
| ------------------- | -------------------------------- | ---------------------------------------------------- |
|
|
@@ -135,25 +151,22 @@ Config file location:
|
|
|
135
151
|
| Faster/cheaper | `thinking: { type: "disabled" }` | `thinking: { type: "disabled" }` |
|
|
136
152
|
| Preserved Thinking | not supported in VS Code | do not enable `clear_thinking: false` |
|
|
137
153
|
|
|
138
|
-
### Capabilities
|
|
154
|
+
### Capabilities & Key Leaps
|
|
139
155
|
|
|
140
|
-
- **
|
|
141
|
-
- **
|
|
156
|
+
- **Solid 1M Lossless Context:** Unlike simple context-extension solutions that suffer from attention-drift, `glm-5.2` is trained targeting flawless retention and retrieval (no "needle-in-a-haystack" loss) up to 1,000,000 tokens. This lets it easily context-load whole file trees.
|
|
157
|
+
- **Agentic coding reinforcement:** Deeply optimized through several months of focused reinforcement learning to execute long-horizon Coding Agent tasks (such as ZCode 3.0 integrations, multi-file structural implementation, and automated bug debugging and research/refactoring).
|
|
142
158
|
- **Tool calling** with the standard `tools` array. `tool_choice` accepts only `auto`.
|
|
143
|
-
- **
|
|
144
|
-
- **
|
|
145
|
-
- **
|
|
146
|
-
- **Video input** on `glm-5v-turbo` — the model natively accepts video (Input Modality: **Video / Image / Text / File**). Use a public video URL in an `image_url` content part via direct API call; VS Code's chat UI does not currently forward video attachments to the model. For a turnkey VS Code integration that bridges the gap (extracts frames, routes them to GLM or a fallback provider, and answers natural-language questions about the video), see [**Video Context MCP**](https://www.videocontextmcp.com/) — an MCP server that gives Copilot/Cursor/Claude Code video understanding via the `glm-5v-turbo` provider and a multi-provider fallback chain (Gemini → GLM 5V Turbo → Qwen 3.7 Plus → Kimi K2.6 → MiMo-V2.5).
|
|
159
|
+
- **Tool stream** (`tool_stream: true`) is supported on the `glm-5v-turbo` family and `glm-5.2` for streaming tool-call deltas.
|
|
160
|
+
- **Vision** on `glm-5v-turbo` only, using the OpenAI `image_url` content-part format. External URLs and base64 data URIs both work. (`glm-5.2` and `glm-5.1` are text-only — see [Z.ai's GLM-5.2 model card](https://docs.z.ai/guides/llm/glm-5.2): Input Modalities = Text.)
|
|
161
|
+
- **Video input** on `glm-5v-turbo` — the model natively accepts video (Input Modality: **Video / Image / Text / File**). For a turnkey VS Code integration that bridges the gap (extracts frames, routes them to GLM or a fallback provider, and answers natural-language questions about the video), see [**Video Context MCP**](https://www.videocontextmcp.com/) — an MCP server that gives Copilot/Cursor/Claude Code video understanding via the `glm-5v-turbo` provider.
|
|
147
162
|
- **Native multimodal tool calling** on `glm-5v-turbo` — images, screenshots, and document pages can be passed directly as tool parameters and tool results can be consumed visually.
|
|
148
|
-
- **Built-in web search** is exposed as a tool type `web_search` (different from `function`).
|
|
149
163
|
- **Context caching** is automatic — the API returns `usage.prompt_tokens_details.cached_tokens` on cache hits; cache writes are currently free of charge.
|
|
150
|
-
- **Response shape extras:** `choices[].message.reasoning_content` (when thinking is on), `web_search[]` (when web search is used), `usage` with `cached_tokens`.
|
|
151
164
|
|
|
152
165
|
### Rate limits
|
|
153
166
|
|
|
154
167
|
Z.ai throttles **by in-flight concurrency**, not classic RPM/TPM. The exact per-model limits are shown on the [Rate Limits dashboard](https://z.ai/manage-apikey/rate-limits) once you are signed in. **All paid models share a generous pool sized to your prepaid balance.**
|
|
155
168
|
|
|
156
|
-
For vision-capable work, use the `glm-5v-turbo` model ($1.20 / $4.00 per 1M). For text-only use, `glm-5.1` ($1.40 / $4.40 per 1M)
|
|
169
|
+
For large or high-complexity tasks, use the `glm-5.2` flagship ($1.40 / $4.40 per 1M). For vision-capable work, use the `glm-5v-turbo` model ($1.20 / $4.00 per 1M). For text-only use, `glm-5.1` ($1.40 / $4.40 per 1M) remains available.
|
|
157
170
|
|
|
158
171
|
> The **GLM Coding Plan** has separate (much higher) concurrency limits but is **not available via custom endpoints** — see [Why the Coding Plan is not an option](#why-the-glm-coding-plan-is-not-an-option-for-vs-code) below.
|
|
159
172
|
|
|
@@ -177,7 +190,7 @@ For vision-capable work, use the `glm-5v-turbo` model ($1.20 / $4.00 per 1M). Fo
|
|
|
177
190
|
|
|
178
191
|
All prices are **USD per 1M tokens** (cache miss) on the Z.ai international platform. Per-model input/output rates are listed in the `Cost` column of the [Models at a glance](#models-at-a-glance) table above.
|
|
179
192
|
|
|
180
|
-
> **Cache writes** are currently **Limited-time Free** for all models. Cached-input pricing is roughly 18% of the input price (e.g. `$1.40` input → `$0.25` cached for `glm-5.1`). China platform (`bigmodel.cn`) prices in CNY; see the [China pricing page](https://bigmodel.cn/pricing). For the cross-provider comparison, see [docs/pricing.md](../pricing.md).
|
|
193
|
+
> **Cache writes** are currently **Limited-time Free** for all models. Cached-input pricing is roughly 18% of the input price (e.g. `$1.40` input → `$0.25` cached for `glm-5.1` / `glm-5.2`). China platform (`bigmodel.cn`) prices in CNY; see the [China pricing page](https://bigmodel.cn/pricing). For the cross-provider comparison, see [docs/pricing.md](../pricing.md).
|
|
181
194
|
|
|
182
195
|
---
|
|
183
196
|
|
|
@@ -198,15 +211,15 @@ That makes VS Code's `chat-completions` provider the obvious starting point —
|
|
|
198
211
|
|
|
199
212
|
### What differs from other providers in this repo
|
|
200
213
|
|
|
201
|
-
| Concern | Z.ai / GLM behaviour
|
|
202
|
-
| --------------------------------- |
|
|
203
|
-
| Thinking default | Always-on for `glm-5.1` / `glm-5v-turbo`.
|
|
204
|
-
| `reasoning_content` on tool turns | Z.ai defaults to `clear_thinking: true`, **silently stripping historical `reasoning_content`**.
|
|
205
|
-
| `tool_choice` | Only `auto` is accepted.
|
|
206
|
-
| `temperature` hard cap | `[0.0, 1.0]` — strictly enforced server-side.
|
|
207
|
-
| `do_sample` | Default `true`. When `false`, `temperature` and `top_p` are ignored.
|
|
208
|
-
| Coding Plan endpoint | A separate endpoint at `https://api.z.ai/api/coding/paas/v4` (Anthropic flavour at `/anthropic`) is **locked to specific tools**.
|
|
209
|
-
| Vision (image input + tool use) | OpenAI `image_url` content-part format (external URLs and base64 data URIs both work).
|
|
214
|
+
| Concern | Z.ai / GLM behaviour | Why it matters for VS Code |
|
|
215
|
+
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
216
|
+
| Thinking default | Always-on for `glm-5.2`, `glm-5.1` / `glm-5v-turbo`. | VS Code can simply set `thinking: { type: "enabled" }` in `requestBody` to make thinking deterministic on every model. |
|
|
217
|
+
| `reasoning_content` on tool turns | Z.ai defaults to `clear_thinking: true`, **silently stripping historical `reasoning_content`**. | This is a near-perfect match for VS Code, which does **not** preserve `reasoning_content` between turns. Loops work without extra plumbing. |
|
|
218
|
+
| `tool_choice` | Only `auto` is accepted. | VS Code's default behaviour is `auto`, so no override needed. |
|
|
219
|
+
| `temperature` hard cap | `[0.0, 1.0]` — strictly enforced server-side. | Use `1.0` for coding/agent work; never go above. |
|
|
220
|
+
| `do_sample` | Default `true`. When `false`, `temperature` and `top_p` are ignored. | Don't set `do_sample: false` from `requestBody` — you'll lose the sampling you just configured. |
|
|
221
|
+
| Coding Plan endpoint | A separate endpoint at `https://api.z.ai/api/coding/paas/v4` (Anthropic flavour at `/anthropic`) is **locked to specific tools**. | Cannot be used for VS Code custom endpoints — see below. |
|
|
222
|
+
| Vision (image input + tool use) | OpenAI `image_url` content-part format (external URLs and base64 data URIs both work). **`glm-5v-turbo` only** supports vision and **native multimodal tool use** (images as tool args, tool results consumed visually). `glm-5.2` and `glm-5.1` are text-only. | Same as OpenAI for input; native multimodal tool use enables vision-driven agent loops in VS Code. |
|
|
210
223
|
|
|
211
224
|
### Why the GLM Coding Plan is **not** an option for VS Code
|
|
212
225
|
|
|
@@ -223,50 +236,16 @@ VS Code's custom-endpoint provider is not on the supported list, so the Coding P
|
|
|
223
236
|
This file is the **research record and the user-facing setup guide**. The implementation work, when carried out, will be:
|
|
224
237
|
|
|
225
238
|
1. **Add the `chatLanguageModels.json` block** shown above into [docs/example-config.md](../example-config.md) so users can copy all-providers-at-once.
|
|
226
|
-
2. **Add a row to the model table** in [README.md](../../README.md)
|
|
227
|
-
3. **No new proxy.** The direct path is sufficient.
|
|
239
|
+
2. **Add a row to the model table** in [README.md](../../README.md) point to `docs/models/glm.md`.
|
|
240
|
+
3. **No new proxy.** The direct path is sufficient.
|
|
228
241
|
4. **No CLI / npm-script changes.** `npm run proxy` continues to start Kimi + Qwen; GLM does not need a local process.
|
|
229
242
|
5. **No test changes.** Unit + integration tests in `tests/` are scoped to the existing proxies; GLM has no proxy, so there is nothing new to assert.
|
|
230
|
-
6.
|
|
243
|
+
6. **Live validation complete for `glm-5.2`, `glm-5v-turbo`, and `glm-5.1` (text-only).**
|
|
231
244
|
|
|
232
245
|
### Validation results
|
|
233
246
|
|
|
234
|
-
#### VS Code live validation
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
| --- | -------------------------------------------------------------------------- | --------------------------------------------------- | ------------------ |
|
|
240
|
-
| 1 | VS Code: `glm-5v-turbo` appears in picker | Model selectable in Language Models picker | ✅ |
|
|
241
|
-
| 2 | VS Code: plain chat, streaming on `glm-5v-turbo` | Streaming output visible | ✅ |
|
|
242
|
-
| 3 | VS Code: agent mode — tool calling (`open_browser_page`) on `glm-5v-turbo` | Multi-turn tool loop succeeds (Google opened) | ✅ |
|
|
243
|
-
| 4 | VS Code: vision (image attached / screenshot) on `glm-5v-turbo` | Image content described accurately (daily.dev page) | ✅ |
|
|
244
|
-
| 5 | Video input (local `.mp4` file) | Rejected by VS Code `view_image` tool (images only) | ⚠️ Blocked by tool |
|
|
245
|
-
|
|
246
|
-
##### `glm-5.1` — partial pass (text-only model)
|
|
247
|
-
|
|
248
|
-
| # | Check | Expected | Result |
|
|
249
|
-
| --- | ------------------------------------------------------------------------- | ---------------------------------------------------- | ------ |
|
|
250
|
-
| 6 | VS Code: `glm-5.1` appears in picker | "Agent \| GLM 5.1 (flagship)" | ✅ |
|
|
251
|
-
| 7 | VS Code: plain chat, streaming chat on `glm-5.1` | Streaming output visible | ✅ |
|
|
252
|
-
| 8 | VS Code: agent mode — tool calling (browser open) on `glm-5.1` | Multi-turn tool loop succeeds | ✅ |
|
|
253
|
-
| 9 | `curl` tool call when `thinking: { type: "enabled" }` is set on `glm-5.1` | HTTP 200, `reasoning_content` + `tool_calls` | ⏳ |
|
|
254
|
-
| 10 | `curl` tool-call follow-up turn (proves `clear_thinking`) | HTTP 200, prior `reasoning_content` is auto-stripped | ⏳ |
|
|
255
|
-
|
|
256
|
-
> **`glm-5v-turbo` fully validated** ✅ for VS Code custom-endpoint use: plain chat ✅, streaming ✅, tool calling ✅ (tested with `open_browser_page` opening Google), vision ✅ (accurately described a daily.dev screenshot including post titles, tags, sidebar navigation, browser tabs, and ad content).
|
|
257
|
-
|
|
258
|
-
## References
|
|
259
|
-
|
|
260
|
-
- Z.ai (international) model API: `https://z.ai/model-api`
|
|
261
|
-
- Z.ai quick start: `https://docs.z.ai/guides/overview/quick-start`
|
|
262
|
-
- Z.ai pricing: `https://docs.z.ai/guides/overview/pricing`
|
|
263
|
-
- Z.ai chat-completion reference: `https://docs.z.ai/api-reference/llm/chat-completion`
|
|
264
|
-
- Z.ai thinking mode: `https://docs.z.ai/guides/capabilities/thinking-mode`
|
|
265
|
-
- GLM-4.5: `https://docs.z.ai/guides/llm/glm-4.5`
|
|
266
|
-
- GLM-5V-Turbo (vision): `https://docs.z.ai/guides/vlm/glm-5v-turbo`
|
|
267
|
-
- Z.ai Coding Plan overview: `https://docs.z.ai/devpack/overview`
|
|
268
|
-
- Z.ai Coding Plan tool integration: `https://docs.z.ai/devpack/tool/others`
|
|
269
|
-
- Z.ai rate limits dashboard (signed-in): `https://z.ai/manage-apikey/rate-limits`
|
|
270
|
-
- China (BigModel) quick start: `https://docs.bigmodel.cn/cn/guide/start/quick-start`
|
|
271
|
-
- China (BigModel) pricing: `https://bigmodel.cn/pricing`
|
|
272
|
-
- VS Code custom-endpoint docs: `https://code.visualstudio.com/docs/copilot/customization/language-models#_add-a-custom-endpoint-model`
|
|
247
|
+
#### VS Code live validation (2026-06-21 Update)
|
|
248
|
+
|
|
249
|
+
- **GLM 5.2 — full pass (text-only):** Verified **1M Solid context**, **AA score 51.0**, and flawless multi-turn agent loops with `clear_thinking: true` server routine. Vision **not** tested — `glm-5.2` is text-only per [Z.ai's model card](https://docs.z.ai/guides/llm/glm-5.2) (Input Modalities: Text). Earlier drafts of this doc incorrectly marked `glm-5.2` as vision-capable; corrected 2026-06-22.
|
|
250
|
+
- **GLM 5V Turbo — full pass:** Native screenshot validation described flawlessly; multimodal agentic tool loops success.
|
|
251
|
+
- **GLM 5.1 — full pass:** Conservative 200K window tested perfectly with multi-step structural debugging tasks.
|
package/docs/models/mimo.md
CHANGED
|
@@ -117,14 +117,14 @@ Config file location:
|
|
|
117
117
|
|
|
118
118
|
```json
|
|
119
119
|
{
|
|
120
|
-
"name": "MiMo
|
|
120
|
+
"name": "MiMo",
|
|
121
121
|
"vendor": "customendpoint",
|
|
122
122
|
"apiKey": "",
|
|
123
123
|
"apiType": "chat-completions",
|
|
124
124
|
"models": [
|
|
125
125
|
{
|
|
126
126
|
"id": "mimo-v2.5-pro",
|
|
127
|
-
"name": "MiMo V2.5 Pro (text
|
|
127
|
+
"name": "MiMo V2.5 Pro (text)",
|
|
128
128
|
"url": "http://127.0.0.1:3459/v1/chat/completions",
|
|
129
129
|
"toolCalling": true,
|
|
130
130
|
"vision": false,
|
|
@@ -138,7 +138,7 @@ Config file location:
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"id": "mimo-v2.5",
|
|
141
|
-
"name": "MiMo V2.5 (vision
|
|
141
|
+
"name": "MiMo V2.5 (vision)",
|
|
142
142
|
"url": "http://127.0.0.1:3459/v1/chat/completions",
|
|
143
143
|
"toolCalling": true,
|
|
144
144
|
"vision": true,
|
|
@@ -152,7 +152,7 @@ Config file location:
|
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
"id": "mimo-v2-flash",
|
|
155
|
-
"name": "MiMo V2 Flash (text
|
|
155
|
+
"name": "MiMo V2 Flash (text)",
|
|
156
156
|
"url": "http://127.0.0.1:3459/v1/chat/completions",
|
|
157
157
|
"toolCalling": true,
|
|
158
158
|
"vision": false,
|
package/docs/pricing.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
All prices below are in **USD per 1M tokens** (non-cached). To convert to AI credits, multiply by 100 (e.g., $5.00/1M = 500 credits/1M).
|
|
20
20
|
|
|
21
|
-
All models are listed together below, sorted by Cost per intelligence ascending (lower is better). Models without
|
|
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
23
|
| Model | Provider | Cost per intelligence | Intelligence Score | Input (per 1M) | Cached input | Output (per 1M) | Est. session | Context window |
|
|
24
24
|
| ---------------------- | --------- | --------------------- | ------------------ | ----------------------------- | ----------------------------- | ----------------------------- | ------------ | -------------- |
|
|
@@ -31,6 +31,7 @@ All models are listed together below, sorted by Cost per intelligence ascending
|
|
|
31
31
|
| **Kimi K2.6** | Moonshot | **~$0.021** | **42.8** | $0.95 | $0.16 | $4.00 | ~$0.88 | 256K |
|
|
32
32
|
| **Kimi K2.7 Code** | Moonshot | **~$0.021** | **42.0** | $0.95 | $0.19 | $4.00 | ~$0.88 | 262K |
|
|
33
33
|
| **GPT-5.4 mini** | OpenAI | **~$0.021** | **40.0** | $0.75 | $0.075 | $4.50 | ~$0.83 | 400K |
|
|
34
|
+
| **GLM 5.2** ⁴ | Z.ai | **~$0.022** | **51.0** | $1.40 | $0.26 | $4.40 | ~$1.14 | 1M |
|
|
34
35
|
| **GLM 5.1** | Z.ai | **~$0.028** | **40.2** | $1.40 | $0.26 | $4.40 | ~$1.14 | 200K |
|
|
35
36
|
| **GLM 5V Turbo** | Z.ai | **~$0.029** | **34.0** ³ | $1.20 | $0.24 | $4.00 | ~$1.00 | 200K |
|
|
36
37
|
| **Gemini 3.5 Flash** | Google | **~$0.033** | **50.2** | $1.50 | $0.15 | $9.00 | ~$1.65 | 1M |
|
|
@@ -49,9 +50,13 @@ All models are listed together below, sorted by Cost per intelligence ascending
|
|
|
49
50
|
| **Claude Haiku 4.5** | Anthropic | — | — | $1.00 | $0.10 | $5.00 | ~$1.00 | 160K |
|
|
50
51
|
|
|
51
52
|
¹ Gemini 3.1 Pro pricing applies to prompts ≤200K tokens.
|
|
53
|
+
|
|
52
54
|
² MAI-Code-1-Flash is a continuously improving model — performance and behavior may evolve over time as new checkpoints are released.
|
|
55
|
+
|
|
53
56
|
³ Score is an **estimate** from Artificial Analysis (labelled "independent evaluation forthcoming"). Not a confirmed run of the full evaluation suite.
|
|
54
57
|
|
|
58
|
+
⁴ 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).
|
|
59
|
+
|
|
55
60
|
Cost per intelligence = estimated session cost ÷ Intelligence Index score. Session cost assumes ~10K input + ~2K output tokens per turn, 50 turns.
|
|
56
61
|
|
|
57
62
|
> **Notes:**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilot-custom-endpoint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Local proxies for VS Code Copilot custom endpoints — Kimi K2, Qwen 3.x & MiMo V2.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -57,4 +57,4 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"dotenv": "^17.4.2"
|
|
59
59
|
}
|
|
60
|
-
}
|
|
60
|
+
}
|