copilot-custom-endpoint 3.2.0 → 3.3.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 +17 -20
- package/docs/example-config.md +2 -2
- package/docs/models/mimo.md +7 -12
- package/docs/pricing.md +28 -70
- package/lib/mimo-rewrite.mjs +2 -5
- package/package.json +1 -1
- package/proxy/mimo-proxy.mjs +4 -5
package/README.md
CHANGED
|
@@ -20,20 +20,19 @@ That's it. No code, no servers to manage (unless the model specifically needs th
|
|
|
20
20
|
|
|
21
21
|
## Pick a model
|
|
22
22
|
|
|
23
|
-
| Model | Provider | Needs proxy? | Vision | Setup guide
|
|
24
|
-
| ---------------------------- | ---------- | ----------------------- | ------ |
|
|
25
|
-
| **Kimi K3** | Moonshot | **Yes** | ✅ | [Manual setup](docs/models/kimi.md)
|
|
26
|
-
| **MiMo V2.6 Pro** | Xiaomi | **Yes** | ✅ | [Manual setup](docs/models/mimo.md)
|
|
27
|
-
| **MiMo V2.6 Flash** | Xiaomi | **Yes** | ✅ | [Manual setup](docs/models/mimo.md)
|
|
28
|
-
| **MiMo V2.6 Pro UltraSpeed** | Xiaomi | **Yes** | ✅ | [Manual setup](docs/models/mimo.md)
|
|
29
|
-
| **
|
|
30
|
-
| **Qwen 3.8 Max (
|
|
31
|
-
| **
|
|
32
|
-
| **
|
|
33
|
-
| **GLM 5.3
|
|
34
|
-
| **
|
|
35
|
-
| **DeepSeek V4
|
|
36
|
-
| **DeepSeek V4 Pro 0813** | DeepSeek | No (uses an extension) | ❌ | [Extension](https://marketplace.visualstudio.com/items?itemName=Vizards.deepseek-v4-for-copilot) / [setup notes](docs/models/deepseek.md) |
|
|
23
|
+
| Model | Provider | Needs proxy? | Vision | Setup guide |
|
|
24
|
+
| ---------------------------- | ---------- | ----------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
25
|
+
| **Kimi K3** | Moonshot | **Yes** | ✅ | [Manual setup](docs/models/kimi.md) |
|
|
26
|
+
| **MiMo V2.6 Pro** | Xiaomi | **Yes** | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) / [Manual setup](docs/models/mimo.md) |
|
|
27
|
+
| **MiMo V2.6 Flash** | Xiaomi | **Yes** | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) / [Manual setup](docs/models/mimo.md) |
|
|
28
|
+
| **MiMo V2.6 Pro UltraSpeed** | Xiaomi | **Yes** | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=sdmapvstool.xiaomimimo-for-copilot) / [Manual setup](docs/models/mimo.md) |
|
|
29
|
+
| **Qwen 3.8 Max (0803)** | OpenRouter | Optional (experimental) | ✅ | [Snapshot/proxy setup](docs/models/qwen.md#optional-openrouter-snapshot-proxy) |
|
|
30
|
+
| **Qwen 3.8 Max (0902)** | DashScope | Optional (recommended) | ✅ | [Manual setup](docs/models/qwen.md) |
|
|
31
|
+
| **MiniMax M3** | MiniMax | No | ✅ | [Extension](https://github.com/tugudush/minimax-copilot) ★ / [Manual setup](docs/models/minimax.md) |
|
|
32
|
+
| **GLM 5.3 Flash** | Z.ai | No | ✅ | [Manual setup](docs/models/glm.md) |
|
|
33
|
+
| **GLM 5.3** | Z.ai | No | ❌ | [Manual setup](docs/models/glm.md) |
|
|
34
|
+
| **DeepSeek V4.1 Flash** | DeepSeek | No (uses an extension) | ✅ | [Extension](https://marketplace.visualstudio.com/items?itemName=Vizards.deepseek-v4-for-copilot) / [setup notes](docs/models/deepseek.md) |
|
|
35
|
+
| **DeepSeek V4 Pro 0813** | DeepSeek | No (uses an extension) | ❌ | [Extension](https://marketplace.visualstudio.com/items?itemName=Vizards.deepseek-v4-for-copilot) / [setup notes](docs/models/deepseek.md) |
|
|
37
36
|
|
|
38
37
|
## Setup
|
|
39
38
|
|
|
@@ -122,7 +121,7 @@ It approximates the cost of one point on the AA Intelligence Index under the com
|
|
|
122
121
|
|
|
123
122
|
For example, GLM 5.3 Flash is `(0.5 × $0.15) + (0.1 × $0.50) = $0.125`, shown as `~$0.13`. Cached-input discounts are not included. Actual costs vary with context length, output length, caching, pricing tiers, promotions, and provider billing. DeepSeek estimates use peak rates; official off-peak rates are half.
|
|
124
123
|
|
|
125
|
-
The current AA values come from OpenRouter's September 22 model metadata and ranking card; **every pricing cell comes from first-party provider pricing or GitHub Copilot's official billing table, never OpenRouter.** The OpenRouter ranking card places unversioned Qwen3.8 Max at **53.4 (#2)**, while the exact 0902 API metadata row is **45.4**. Qwen Cloud PAYG pricing remains **$2 / $0.25 implicit cache / $6** for Qwen3.8 Max; its separate Token Plan is not the PAYG rate table. This refresh adds Xiaomi MiMo V2.6 and xAI Grok 4.7,
|
|
124
|
+
The current AA values come from OpenRouter's September 22 model metadata and ranking card; **every pricing cell comes from first-party provider pricing or GitHub Copilot's official billing table, never OpenRouter.** The OpenRouter ranking card places unversioned Qwen3.8 Max at **53.4 (#2)**, while the exact 0902 API metadata row is **45.4**. Qwen Cloud PAYG pricing remains **$2 / $0.25 implicit cache / $6** for Qwen3.8 Max; its separate Token Plan is not the PAYG rate table. This refresh records Gemini 3.8 Flash as **Copilot-native** and adds Xiaomi MiMo V2.6 and xAI Grok 4.7 as **Copilot-native** models, using the current AA v4.3.2 composites.
|
|
126
125
|
|
|
127
126
|
| Model | Provider | Cost per intelligence | Intelligence Score | Est. session | Vision | Context window |
|
|
128
127
|
| ---------------------------- | --------- | --------------------- | ------------------ | ------------ | ------ | -------------- |
|
|
@@ -131,7 +130,6 @@ The current AA values come from OpenRouter's September 22 model metadata and ran
|
|
|
131
130
|
| **MiMo V2.6 Pro** | Xiaomi | **~$0.0066** | **46.3** | ~$0.30 | ✅ | 1M |
|
|
132
131
|
| **DeepSeek V4.1 Flash** | DeepSeek | **~$0.0068** | **39.5** | ~$0.27 | ✅ | 1M |
|
|
133
132
|
| **MiniMax M3** | MiniMax | **~$0.0093** | **29.2** | ~$0.27 | ✅ | 1M |
|
|
134
|
-
| **MiMo V2.5 Pro** | Xiaomi | **~$0.0115** | **26.0** | ~$0.30 | ❌ | 1M |
|
|
135
133
|
| **Gemini 3.8 Flash** | Google | **~$0.0183** | **40.9** | ~$0.75 | ✅ | 1M |
|
|
136
134
|
| **GLM 5.3** | Z.ai | **~$0.0254** | **44.8** | ~$1.14 | ❌ | 1M |
|
|
137
135
|
| **DeepSeek V4 Pro 0813** | DeepSeek | **~$0.0294** | **36.0** | ~$1.06 | ❌ | 1M |
|
|
@@ -141,6 +139,7 @@ The current AA values come from OpenRouter's September 22 model metadata and ran
|
|
|
141
139
|
| **Grok 4.6** | xAI | **~$0.0361** | **44.3** | ~$1.60 | ✅ | 500K |
|
|
142
140
|
| **GPT-5.6 Terra** | OpenAI | **~$0.0523** | **42.1** | ~$2.20 | ✅ | 1M |
|
|
143
141
|
| **Claude Sonnet 5** | Anthropic | **~$0.0524** | **38.2** | ~$2.00 | ✅ | 1M |
|
|
142
|
+
| **MiMo V2.6 Pro UltraSpeed** | Xiaomi | **~$0.0658** | **46.3** | ~$3.05 | ✅ | 1M |
|
|
144
143
|
| **Kimi K3** | Moonshot | **~$0.0688** | **43.6** | ~$3.00 | ✅ | 1M |
|
|
145
144
|
| **GPT-5.6 Sol** | OpenAI | **~$0.0851** | **47.0** | ~$4.00 | ✅ | 1M |
|
|
146
145
|
| **Claude Opus 5** | Anthropic | **~$0.0984** | **50.8** | ~$5.00 | ✅ | 1M |
|
|
@@ -148,10 +147,8 @@ The current AA values come from OpenRouter's September 22 model metadata and ran
|
|
|
148
147
|
| **GPT-6 Astra** | OpenAI | **~$0.1898** | **52.7** | ~$10.00 | ✅ | 1M |
|
|
149
148
|
| **Claude Fable 5** | Anthropic | **~$0.2016** | **49.6** | ~$10.00 | ✅ | 1M |
|
|
150
149
|
| **MiMo V2.6 Flash** | Xiaomi | — | — | ~$0.10 | ✅ | 1M |
|
|
151
|
-
| **MiMo V2.5** | Xiaomi | — | — | ~$0.10 | ✅ | 1M |
|
|
152
|
-
| **MiMo V2.6 Pro UltraSpeed** | Xiaomi | — | — | ~$3.05 | ✅ | 1M |
|
|
153
150
|
|
|
154
|
-
> `MiniMax M3 Priority` is intentionally omitted from this snapshot because it is the same model with a priority service tier; the full pricing table documents its separate tier cost.
|
|
151
|
+
> `MiMo V2.6 Pro UltraSpeed` uses the MiMo V2.6 Pro benchmark score because it is the same-quality latency tier; no independent composite is published. `MiniMax M3 Priority` is intentionally omitted from this snapshot because it is the same model with a priority service tier; the full pricing table documents its separate tier cost.
|
|
155
152
|
|
|
156
153
|
> Detailed pricing, benchmark provenance, and model-specific notes live in [docs/pricing.md](docs/pricing.md) and [docs/benchmarks.md](docs/benchmarks.md). This page stays focused on setup and model selection. For a copy-paste config containing **all providers at once**, see [docs/example-config.md](docs/example-config.md).
|
|
157
154
|
|
|
@@ -173,7 +170,7 @@ VS Code's built-in `view_image` tool only accepts **static images** (PNG, JPG, G
|
|
|
173
170
|
**Video Context MCP** is a small MCP server that bridges that gap. It works with **GitHub Copilot, Cursor, and Claude Code** out of the box, and:
|
|
174
171
|
|
|
175
172
|
- **Extracts frames** from local files or remote URLs (no `ffmpeg` gymnastics required).
|
|
176
|
-
- **Routes them through a multi-provider fallback chain** — `Gemini → GLM 4.6V Flash → Qwen3.8-max
|
|
173
|
+
- **Routes them through a multi-provider fallback chain** — `Gemini → GLM 4.6V Flash → Qwen3.8-max`.
|
|
177
174
|
- **Answers natural-language questions** about the video grounded in actual frames: "what does the speaker click in the last 30 seconds?", "summarize the demo", "find the frame where the error appears".
|
|
178
175
|
- **Extras:** timestamp search, audio transcription with speaker diarization, and video metadata (resolution, duration, codec).
|
|
179
176
|
|
package/docs/example-config.md
CHANGED
|
@@ -6,7 +6,7 @@ Here's a complete, real-world `chatLanguageModels.json` that combines **the `cus
|
|
|
6
6
|
>
|
|
7
7
|
> **Note:** The `apiKey` fields are left as empty strings — set them via the **Chat: Manage Language Models** UI (Command Palette → right-click provider group → **Update API Key**). After you set a key via the UI, VS Code replaces the empty string with a `${input:chat.lm.secret.<id>}` secret reference.
|
|
8
8
|
>
|
|
9
|
-
> The live config points Qwen at the local proxy (`:3458`) and MiMo at the local proxy (`:3459`). When using a proxy, align the model `requestBody` overrides with the proxy's behavior: Qwen sends no `requestBody` (the proxy manages `enable_thinking` dynamically); MiMo sends only `temperature` and `top_p` (the proxy injects `thinking: {"type": "disabled"}`
|
|
9
|
+
> The live config points Qwen at the local proxy (`:3458`) and MiMo at the local proxy (`:3459`). When using a proxy, align the model `requestBody` overrides with the proxy's behavior: Qwen sends no `requestBody` (the proxy manages `enable_thinking` dynamically); MiMo sends only `temperature` and `top_p` (the proxy injects `thinking: {"type": "disabled"}` when tool history is missing `reasoning_content` and leaves it absent on plain chat). OpenRouter lists Qwen 3.8 Max as two frozen snapshots (`qwen/qwen3.8-max` = 0803 and `qwen/qwen3.8-max-0902` = 0902); this DashScope config intentionally uses the provider ID `qwen3.8-max` and does not pretend the OpenRouter slugs are interchangeable.
|
|
10
10
|
|
|
11
11
|
```json
|
|
12
12
|
[
|
|
@@ -173,7 +173,7 @@ If you only need one provider, jump straight to its setup guide:
|
|
|
173
173
|
|
|
174
174
|
- [Kimi K3 / K2.6 / K2.7 Code](kimi.md)
|
|
175
175
|
- [Qwen 3.8 Max](qwen.md)
|
|
176
|
-
- [Xiaomi MiMo (V2.
|
|
176
|
+
- [Xiaomi MiMo (V2.6 Pro / Flash / Pro UltraSpeed)](mimo.md)
|
|
177
177
|
- [MiniMax M3 (Standard)](minimax.md) and [MiniMax M3 (Priority)](minimax.md#5-m3-priority-tier-optional)
|
|
178
178
|
- [GLM (5.3 Flash / 5.3 / 5.2 / 5.1)](glm.md)
|
|
179
179
|
|
package/docs/models/mimo.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Xiaomi MiMo — VS Code Custom Endpoint Setup Guide
|
|
2
2
|
|
|
3
|
-
> **TL;DR:** MiMo V2.6 is now the current API family. The proxy-backed custom endpoint keeps V2.6 thinking enabled when `reasoning_content` is present and falls back to disabled thinking when VS Code drops that history field. Direct and proxy configurations are documented below
|
|
3
|
+
> **TL;DR:** MiMo V2.6 is now the current API family. The proxy-backed custom endpoint keeps V2.6 thinking enabled when `reasoning_content` is present and falls back to disabled thinking when VS Code drops that history field. Direct and proxy configurations are documented below.
|
|
4
4
|
|
|
5
5
|
## At a Glance
|
|
6
6
|
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
| Alternative methods | Direct API (static `thinking: disabled`) or the Xiaomi extension |
|
|
11
11
|
| Mode (custom endpoint) | **Direct** (static `thinking: disabled`) **or** **Proxy** (dynamic, local on `:3459`) |
|
|
12
12
|
| Billing | **Pay-as-You-Go** _or_ **Token Plan subscription** (shared `requestBody`) |
|
|
13
|
-
| Vision | ✅ Yes (all V2.6 models
|
|
13
|
+
| Vision | ✅ Yes (all V2.6 models) |
|
|
14
14
|
| Tool calling | ✅ Yes; V2.6 preserves thinking only when the history includes `reasoning_content` |
|
|
15
15
|
| Context | 1M |
|
|
16
|
-
| Max output | 131072
|
|
16
|
+
| Max output | 131072 |
|
|
17
17
|
| Endpoint | `https://api.xiaomimimo.com/v1/chat/completions` |
|
|
18
18
|
| Proxy endpoint | `http://127.0.0.1:3459/v1/chat/completions` |
|
|
19
19
|
| Auth | `Authorization: Bearer $MIMO_API_KEY` |
|
|
@@ -25,10 +25,8 @@
|
|
|
25
25
|
| `mimo-v2.6-pro` | ✅ | 1M | 131072 | Flagship full-modality reasoning for complex and long-horizon work |
|
|
26
26
|
| `mimo-v2.6-flash` | ✅ | 1M | 131072 | Lower-cost full-modality model for frequent calls |
|
|
27
27
|
| `mimo-v2.6-pro-ultraspeed` | ✅ | 1M | 131072 | V2.6 Pro quality with the latency-focused UltraSpeed service |
|
|
28
|
-
| `mimo-v2.5-pro` _(legacy)_ | ❌ | 1M | 131072 | Text-only; deprecated October 21, 2026 |
|
|
29
|
-
| `mimo-v2.5` _(legacy)_ | ✅ | 1M | 131072 | Full-modality; deprecated October 21, 2026 |
|
|
30
28
|
|
|
31
|
-
> Xiaomi's API requires the lowercase IDs above.
|
|
29
|
+
> Xiaomi's API requires the lowercase IDs above.
|
|
32
30
|
|
|
33
31
|
## Quick Start
|
|
34
32
|
|
|
@@ -64,7 +62,7 @@ Simplest no-proxy approach — but thinking is always off, so you never see mode
|
|
|
64
62
|
|
|
65
63
|
### Alternative: With optional proxy (dynamic thinking)
|
|
66
64
|
|
|
67
|
-
The `proxy/mimo-proxy.mjs` preserves V2.6 thinking when assistant tool-call history contains `reasoning_content`. When VS Code sends a tool loop with missing reasoning history, it injects `thinking: { "type": "disabled" }` to avoid Xiaomi's 400 response.
|
|
65
|
+
The `proxy/mimo-proxy.mjs` preserves V2.6 thinking when assistant tool-call history contains `reasoning_content`. When VS Code sends a tool loop with missing reasoning history, it injects `thinking: { "type": "disabled" }` to avoid Xiaomi's 400 response.
|
|
68
66
|
|
|
69
67
|
- `npm run proxy:mimo` (from the repo root)
|
|
70
68
|
- `npx copilot-custom-endpoint mimo` (standalone)
|
|
@@ -241,15 +239,14 @@ When using the proxy, point model `url`s to `http://127.0.0.1:3459/v1/chat/compl
|
|
|
241
239
|
- **Thinking is required for full agent quality.** MiMo V2.6 returns HTTP 400 if `reasoning_content` is missing from history when thinking is on. The proxy preserves thinking when that field is present and disables it as a compatibility fallback when VS Code drops it; an extension with a per-`tool_call_id` reasoning cache can keep thinking enabled throughout.
|
|
242
240
|
- **`tool_choice` other than `"auto"` is stripped** and treated as `"auto"`. Don't override it (VS Code's default is `auto`).
|
|
243
241
|
- **Rate limits:** 100 RPM / 10M TPM per model per account.
|
|
244
|
-
- **Vision and full modality:** V2.6 Pro, Flash, and Pro UltraSpeed accept text, image, video, and audio; VS Code custom endpoints expose image input through `vision: true`.
|
|
245
|
-
- **Deprecation:** Xiaomi will deprecate `mimo-v2.5-pro` and `mimo-v2.5` at 10:00 Beijing time on October 21, 2026.
|
|
242
|
+
- **Vision and full modality:** V2.6 Pro, Flash, and Pro UltraSpeed accept text, image, video, and audio; VS Code custom endpoints expose image input through `vision: true`.
|
|
246
243
|
|
|
247
244
|
## Troubleshooting
|
|
248
245
|
|
|
249
246
|
| Symptom | Likely cause | Fix |
|
|
250
247
|
| ------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
251
248
|
| HTTP 400 on the second turn of a tool loop | `reasoning_content` missing in history (thinking on) | Use the proxy (`npm run proxy:mimo`), or add `thinking: { type: "disabled" }` to `requestBody`; an extension with a reasoning cache can keep thinking enabled |
|
|
252
|
-
| Vision request returns an error |
|
|
249
|
+
| Vision request returns an error | The model entry is missing `vision: true` | Add `vision: true` to the model entry — every current MiMo model accepts image input |
|
|
253
250
|
| Custom `tool_choice` ignored | MiMo only honors `"auto"` | Stick to `auto` |
|
|
254
251
|
| 401 Unauthorized | Wrong key, or Token Plan URL used with pay-as-you-go key | Match key prefix (`sk-` vs `tp-`) to the endpoint |
|
|
255
252
|
| 429 rate-limited | Concurrent sessions exceeded 100 RPM / 10M TPM | Reduce concurrent agent sessions |
|
|
@@ -263,7 +260,5 @@ For the cross-provider comparison, see [docs/pricing.md](../pricing.md). Oversea
|
|
|
263
260
|
| `mimo-v2.6-pro` | $0.0036 / 1M | $0.435 / 1M | $0.87 / 1M |
|
|
264
261
|
| `mimo-v2.6-flash` | $0.0028 / 1M | $0.14 / 1M | $0.28 / 1M |
|
|
265
262
|
| `mimo-v2.6-pro-ultraspeed` | $0.036 / 1M | $4.35 / 1M | $8.70 / 1M |
|
|
266
|
-
| `mimo-v2.5-pro` _(legacy)_ | $0.0036 / 1M | $0.435 / 1M | $0.87 / 1M |
|
|
267
|
-
| `mimo-v2.5` _(legacy)_ | $0.0028 / 1M | $0.14 / 1M | $0.28 / 1M |
|
|
268
263
|
|
|
269
264
|
> 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.
|
package/docs/pricing.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Pricing
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
> **Latest refresh (September 22, 2026):** OpenRouter's current metadata uses Artificial Analysis v4.3.2 composites. MiMo V2.6 Pro is **46.3**, Grok 4.7 is **46.4**, and the current values for existing rows are refreshed below. Xiaomi released the V2.6 Pro, Flash, and Pro UltraSpeed models on September 22 and kept the V2.5 prices; V2.5 Pro and V2.5 are scheduled for deprecation on October 21. xAI released Grok 4.7 on September 21 at the same short-context rates as Grok 4.6: **$2 / $0.50 cache hit / $6**. The table preserves Qwen's 0803 ranking-card value (**53.4**) and 0902 metadata value (**45.4**) as separate records. Older numbered notes retain launch-era or earlier methodology scores where relevant; the current table is authoritative for present comparisons.
|
|
3
|
+
> **Latest refresh (September 23, 2026):** OpenRouter's current metadata uses Artificial Analysis v4.3.2 composites. MiMo V2.6 Pro is **46.3**, Grok 4.7 is **46.4**, and the current values for existing rows are refreshed below. Gemini 3.8 Flash is now available as a GitHub Copilot native model. Xiaomi released the V2.6 Pro, Flash, and Pro UltraSpeed models on September 22; the September 23 roster cleanup removes two retired legacy models. xAI released Grok 4.7 on September 21 at the same short-context rates as Grok 4.6: **$2 / $0.50 cache hit / $6**. The table preserves Qwen's 0803 ranking-card value (**53.4**) and 0902 metadata value (**45.4**) as separate records. The current table is authoritative for present comparisons.
|
|
6
4
|
|
|
7
5
|
> **⏰ June 1, 2026 — GitHub Copilot switched to usage-based billing (AI Credits) today.**
|
|
8
6
|
>
|
|
@@ -24,78 +22,38 @@ All prices below are in **USD per 1M tokens** (non-cached). To convert to AI cre
|
|
|
24
22
|
|
|
25
23
|
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.
|
|
26
24
|
|
|
27
|
-
| Model
|
|
28
|
-
|
|
|
29
|
-
| **GLM 5.3 Flash**
|
|
30
|
-
| **GPT-5.6 Luna**
|
|
31
|
-
| **MiMo V2.6 Pro
|
|
32
|
-
| **DeepSeek V4.1 Flash**
|
|
33
|
-
| **MiniMax M3**
|
|
34
|
-
| **
|
|
35
|
-
| **
|
|
36
|
-
| **
|
|
37
|
-
| **
|
|
38
|
-
| **
|
|
39
|
-
| **
|
|
40
|
-
| **
|
|
41
|
-
| **
|
|
42
|
-
| **
|
|
43
|
-
| **
|
|
44
|
-
| **
|
|
45
|
-
| **Kimi K3**
|
|
46
|
-
| **GPT-5.6 Sol**
|
|
47
|
-
| **Claude Opus 5**
|
|
48
|
-
| **Claude Fable 5.1**
|
|
49
|
-
| **GPT-6 Astra**
|
|
50
|
-
| **Claude Fable 5**
|
|
51
|
-
| **MiMo V2.6 Flash
|
|
52
|
-
| **MiMo V2.5** | Xiaomi | — | — | $0.14 | $0.0028 | $0.28 | ~$0.10 | 1M |
|
|
53
|
-
| **MiMo V2.6 Pro UltraSpeed**²⁷ | Xiaomi | — | — | $4.35 | $0.036 | $8.70 | ~$3.05 | 1M |
|
|
54
|
-
|
|
55
|
-
> **Reference notes:** The details below preserve release and pricing context. Use the current table and September 22 refresh note for present values.
|
|
56
|
-
|
|
57
|
-
⁵ **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.
|
|
58
|
-
|
|
59
|
-
⁶ **Claude Sonnet 5** launched at **$2.00 / $0.20 / $10.00** (input / cached / output). Anthropic's current pricing makes those rates standard; the previously announced September 1 increase to $3.00 / $0.30 / $15.00 will not occur. See [Anthropic's pricing page](https://platform.claude.com/docs/en/about-claude/pricing) for the latest.
|
|
60
|
-
|
|
61
|
-
⁷ **Kimi K3** was released on **July 16, 2026**. 2.8T parameters (open-source, weights by July 27, 2026). 1M context window. Always-thinking reasoning model — uses `reasoning_effort` (not the K2.x `thinking` parameter). Fixed sampling: `temperature=1`, `top_p=0.95`. Pricing is flat (no tiering by context length). See [Kimi K3 pricing](https://platform.kimi.ai/docs/pricing/chat-k3) and the [Artificial Analysis model page](https://artificialanalysis.ai/models/kimi-k3).
|
|
62
|
-
|
|
63
|
-
⁸ **GPT-5.6** pricing is **$0.20 / $0.02 / $1.20** for Luna, **$2.00 / $0.20 / $12.00** for Terra, and currently **$4.00 / $0.40 / $20.00** for Sol (input / cached input / output per 1M tokens). The Sol rate is a promotional reduction from $5.00 / $0.50 / $30.00 and is available at least through **November 21, 2026**. OpenAI reduced Luna by 80% and Terra by 20% on July 30, 2026. OpenAI bills cache writes at 1.25x the uncached input rate for GPT-5.6 and later. The Batch API provides an additional 50% discount for asynchronous jobs. All three tiers have a 1M-token context window and support text + image input. See [OpenAI's API pricing](https://developers.openai.com/api/docs/pricing) and [GPT-5.6 announcement](https://openai.com/index/gpt-5-6/).
|
|
64
|
-
|
|
65
|
-
¹⁰ **Claude Opus 5** was released on **July 24, 2026**. AA Intelligence Index score (**63.1**) confirmed by [Artificial Analysis](https://artificialanalysis.ai/models/claude-opus-5). Pricing is $5.00 / $0.50 / $25.00 per MTok input/cached/output. 1M context window, text + image input, adaptive reasoning. Also available in Fast mode ($10/$50 per MTok input/output) and Batch ($2.50/$12.50 per MTok input/output). Uses the newer Claude tokenizer (~30% more tokens than pre-4.7 models). See [Anthropic's Opus 5 announcement](https://www.anthropic.com/news/claude-opus-5).
|
|
66
|
-
|
|
67
|
-
¹¹ **Historical Qwen 3.8 Max launch record:** the August 3, 2026 launch package used the unversioned `qwen3.8-max` name. An earlier Artificial Analysis snapshot reported **58.1**; the current OpenRouter ranking now distinguishes the unversioned **0803** row (**53.4**) from the separate **0902** row (**45.4**). Use the current rows and footnotes ²⁵–²⁶ for comparisons rather than carrying the earlier score forward. See the [Qwen Cloud model page](https://www.qwencloud.com/models/qwen3.8-max), [AA model page](https://artificialanalysis.ai/models/qwen3-8-max), and [OpenRouter model page](https://openrouter.ai/qwen/qwen3.8-max).
|
|
68
|
-
|
|
69
|
-
¹⁴ **Grok 4.6** (xAI/SpaceXAI, released **August 12, 2026**) is now a **GitHub Copilot native** model (GA). AA Intelligence Index **61** (high reasoning preset, #6/188). 500K context window, text + image input, text output. Priced at $2.00 / $0.50 / $6.00 per 1M input/cached/output (75% cache discount). See the [AA model page](https://artificialanalysis.ai/models/grok-4-6), the [xAI announcement](https://x.ai/news/grok-4-6), and the [GitHub Copilot models & pricing page](https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing).
|
|
70
|
-
|
|
71
|
-
¹⁶ **Claude Fable 5** (Anthropic, released **June 9, 2026**) is now a **GitHub Copilot native** model (GA, Powerful; Anthropic's new flagship tier, above Opus). AA Intelligence Index **62.1** (**#3/188**; AA page lists a rounded **62** on its [model page](https://artificialanalysis.ai/models/claude-fable-5)). Currently **#1 in Text, Agent, Code, and Overall Arena**. 1M context window, text + image input, adaptive reasoning. Priced at **$10.00 / $1.00 / $50.00** per 1M input/cached/output (90% cache discount; cache write $12.50). Uses the newer Claude tokenizer (~30% more tokens than pre-4.7 models). **Superseded as Anthropic's flagship by Claude Fable 5.1 (September 1, 2026 — see footnote ²³)**. See the [GitHub Copilot models & pricing page](https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing).
|
|
72
|
-
|
|
73
|
-
¹⁸ **GLM 5.3** is Z.ai's newest flagship (released **August 18, 2026**) with post-training improvements over the previous GLM flagship (~50% coding gain on Z.ai Code Bench). AA Intelligence Index **59.5** (OpenRouter's AA-sourced benchmark; AA's [model page](https://artificialanalysis.ai/models/glm-5-3) lists a rounded **60**, **#8/182**), Coding **74.8**, Agentic **59.1**. Pricing is **$1.40** input, **$0.26** cached, and **$4.40** output per 1M tokens (modeled session cost ~$1.14). 1M context window, 753B params, text-only. Always-thinking: `thinking.type` only supports `enabled` and `reasoning_effort` accepts `low` / `high` / `max` (default `max`). See the [Z.ai model page](https://docs.z.ai/guides/llm/glm-5.3).
|
|
74
|
-
|
|
75
|
-
¹⁹ **DeepSeek V4.1 Flash** and **DeepSeek V4 Pro 0813** are the current API builds. Flash uses canonical model ID `deepseek-flash`, supports text + image input, and has AA Intelligence **39.5** in the current OpenRouter metadata. Pro remains text-only with AA Intelligence **36.3**. DeepSeek's current peak/off-peak pricing is Flash **$0.30 / $0.006 / $1.20** and Pro **$1.32 / $0.044 / $3.96** per 1M input/cache-hit/output at peak, with off-peak rates at half those values. The legacy `deepseek-v4-flash` name remains accepted but is retired. See the [DeepSeek pricing page](https://api-docs.deepseek.com/quick_start/pricing), [update log](https://api-docs.deepseek.com/updates/), and [canonical model record](models/deepseek.md).
|
|
76
|
-
|
|
77
|
-
²⁰ **GLM 5.3 Flash** (`glm-5.3-flash`) is Z.ai's first native multimodal model in the GLM-5 series (released **August 26, 2026**; tested pre-release as "ox-alpha"). Hybrid sparse + linear attention architecture with 320B total / 18B active parameters (open weights, MIT license) and a 1M-token context window; text + image input, text output. AA Intelligence Index **57.5** (OpenRouter's AA-sourced benchmark; AA's [model page](https://artificialanalysis.ai/models/glm-5-3-flash) lists a rounded **57** and ranks it **#3/110** within its open-weights size class), Coding **71.5**, Agentic **58.2**. Launch pricing is **$0.15** input / **$0.03** cached / **$0.50** output per 1M (list), with a **50% off** launch promo (effective **$0.075 / $0.015 / $0.25**) through **September 9, 2026** (24:00 UTC+8). At list price the modeled session cost is ~$0.13 and the cost per intelligence is ~$0.0022 — the cheapest row in this table. Always-thinking: `thinking.type` only supports `enabled`, `reasoning_effort` accepts `low` / `high` / `max` (default `max`). See the [Z.ai model page](https://docs.z.ai/guides/llm/glm-5.3-flash) and [AA model page](https://artificialanalysis.ai/models/glm-5-3-flash).
|
|
78
|
-
|
|
79
|
-
²¹ **Gemini 3.8 Flash** (`gemini-3.8-flash`) was released on **September 2, 2026** — Google's most intelligent Flash model, engineered for long-horizon software engineering, autonomous agents, and enterprise workflows. AA Intelligence Index **58.7** (OpenRouter's AA-sourced benchmark; AA's [model page](https://artificialanalysis.ai/models/gemini-3-8-flash) rounds to **59**, **#17/196**), Coding **76.3**, Agentic **50.0**. 1M context window (1,048,576 input / 65,536 output), text + image + speech + video + PDF input, text output; configurable thinking (`low`/`medium`/`high` — `minimal` is not supported). Fast at **305.5 t/s** per AA but **very verbose** (120M output tokens on the Intelligence Index vs a 71M median) with a high TTFT (13.39 s), so expect output-token costs above what the score alone suggests. **Not yet GitHub Copilot native** (GitHub's Google lineup still ends at 3.7 Flash) — priced from the Gemini API at the **same promotional rates as 3.7 Flash**: $0.75 / $0.075 / $3.75 per 1M input/cached/output through **December 31, 2026**, then $1.50 / $0.15 / $7.50 from January 1, 2027 (90% cache discount; Batch API 50% off; cache storage $0.50/1M per hour during the promo). Vendor-reported: HLE-Verified **54.9**. See the [Google announcement](https://blog.google/innovation-and-ai/models-and-research/gemini-models/3-8-flash-and-3-8-flash-cyber/), the [Gemini API model page](https://ai.google.dev/gemini-api/docs/models/gemini-3.8-flash), and the [AA model page](https://artificialanalysis.ai/models/gemini-3-8-flash).
|
|
80
|
-
|
|
81
|
-
²³ **Claude Fable 5.1** was released on **September 1, 2026** — Anthropic's new flagship, improving on Fable 5 across the board with the biggest gains in agentic coding, long-running agentic workflows, and knowledge work (long code refactors, front-end/visual code generation, finance and analysis), and tending to be more concise in plans and summaries. AA Intelligence Index **65.7** (OpenRouter's AA-sourced benchmark; AA's [model page](https://artificialanalysis.ai/models/claude-fable-5-1) rounds to **66** and ranks it **#1/196**) — the **highest score in this table** — with Coding **81.6** and Agentic **61.3**. GitHub Copilot native (GA, Powerful). 1M context window, text + image input, text output, adaptive reasoning; uses the newer Claude tokenizer (~30% more tokens than pre-4.7 models). Priced at **$10.00 / $0.25 / $50.00** per 1M input/cached/output — the same rates as Fable 5 except **cached input drops from $1.00 to $0.25** (97.5% cache discount); cache write $12.50. Modeled session cost stays ~$10.00, and CPI improves only to ~$0.15 (vs Fable 5's ~$0.161) — still the second-most expensive scored row. At max effort it is slow (66.2 t/s per AA) and very verbose (140M output tokens on the Intelligence Index vs a 71M median; TTFT 283.83 s). Like Fable 5, Anthropic retains request data by default, with zero-data-retention available through the end of 2026 under a time-bound exemption. See the [GitHub Copilot models & pricing page](https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing) and the [AA model page](https://artificialanalysis.ai/models/claude-fable-5-1).
|
|
82
|
-
|
|
83
|
-
²⁴ **GPT-6 Astra** was released on **September 3, 2026** as `gpt-6-astra`, an OpenAI API model and **GitHub Copilot native** model (GA, Powerful). It supports reasoning, text + image input, text output, and a 1M-token context window. Standard pricing is **$10.00 / $1.00 / $50.00** per 1M input/cached/output tokens; cache writes are $12.50/M, and prompts above 272K input tokens use long-context rates. The modeled session cost is ~$10.00 and CPI is ~$0.163. See the [GPT-6 Astra announcement](https://openai.com/index/gpt-6-astra/), [OpenAI API pricing](https://developers.openai.com/api/docs/pricing), and [GitHub Copilot models & pricing](https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing).
|
|
84
|
-
|
|
85
|
-
²⁵ **Qwen 3.8 Max (0803)** is the August 3, 2026 launch checkpoint represented by OpenRouter's unversioned ranking card [`qwen/qwen3.8-max`](https://openrouter.ai/qwen/qwen3.8-max). The September 10 ranking card places it at **#2 with 53.4**. It shares Qwen Cloud's **$2.00 / $0.25 implicit cache / $6.00** PAYG rates, 1M context, 131K maximum output, and text/image/video input with the 0902 snapshot. The validated DashScope setup continues to use provider ID `qwen3.8-max` and the proxy forwards that ID unchanged.
|
|
86
|
-
|
|
87
|
-
²⁶ **Qwen 3.8 Max (0902)** is a separate OpenRouter snapshot, [`qwen/qwen3.8-max-0902`](https://openrouter.ai/qwen/qwen3.8-max-0902), released September 4, 2026. The current public model API reports an AA Intelligence Index of **45.4** for this exact ID. It has the same published **$2.00 / $0.25 implicit cache / $6.00** rates, 1M context, 131K maximum output, and text/image/video input. The OpenRouter slug is not automatically a valid DashScope model ID; see [the Qwen setup guide](models/qwen.md) before changing the upstream URL.
|
|
88
|
-
|
|
89
|
-
²⁷ **MiMo V2.6** was released by Xiaomi on **September 22, 2026** as three API models: `mimo-v2.6-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro-ultraspeed`. All support text, image, video, and audio input, 1M context, and 131K maximum output. Overseas PAYG pricing is Pro **$0.435 / $0.0036 / $0.87**, Flash **$0.14 / $0.0028 / $0.28**, and UltraSpeed **$4.35 / $0.036 / $8.70** per 1M input/cache-hit/output. OpenRouter's current metadata reports AA Intelligence **46.3** for Pro and no composite yet for Flash or UltraSpeed. MiMo V2.5 and V2.5 Pro keep their existing prices but are scheduled for deprecation at 10:00 Beijing time on October 21, 2026. See Xiaomi's [V2.6 release](https://mimo.mi.com/docs/news/latest/v2-6), [model list](https://mimo.mi.com/docs/en-US/quick-start/summary/model), and [pricing](https://mimo.mi.com/docs/en-US/pricing).
|
|
90
|
-
|
|
91
|
-
²⁸ **Grok 4.7** was released by xAI on **September 21, 2026**. It supports text, image, and file input, a 500K context window, and reasoning effort levels from low through xhigh. Short-context API pricing is **$2.00 / $0.50 / $6.00** per 1M input/cache-hit/output; prompts at or above 200K use **$4.00 / $1.00 / $12.00**. OpenRouter's current metadata reports AA Intelligence **46.4**. xAI reports CursorBench 4.0 **46.3%**, DeepSWE v1.1 **71.0%** at high effort, EEBench **64.0%**, AA Briefcase **1,657**, and Terminal-Bench 4.0 **38.0%**. See the [xAI announcement](https://x.ai/news/grok-4-7), [xAI model pricing](https://docs.x.ai/docs/models), and [AA model page](https://artificialanalysis.ai/models/grok-4-7).
|
|
25
|
+
| Model | Provider | Cost per intelligence | Intelligence Score | Input (per 1M) | Cached input | Output (per 1M) | Est. session | Context window |
|
|
26
|
+
| ---------------------------- | --------- | --------------------- | ------------------ | ----------------------------- | ----------------------------- | ----------------------------- | ------------ | -------------- |
|
|
27
|
+
| **GLM 5.3 Flash** | Z.ai | **~$0.0030** | **41.8** | $0.15 | $0.03 | $0.50 | ~$0.13 | 1M |
|
|
28
|
+
| **GPT-5.6 Luna** | OpenAI | **~$0.0059** | **37.3** | $0.20 | $0.02 | $1.20 | ~$0.22 | 1M |
|
|
29
|
+
| **MiMo V2.6 Pro** | Xiaomi | **~$0.0066** | **46.3** | $0.435 | $0.0036 | $0.87 | ~$0.30 | 1M |
|
|
30
|
+
| **DeepSeek V4.1 Flash** | DeepSeek | **~$0.0068** | **39.5** | $0.30 | $0.006 | $1.20 | ~$0.27 | 1M |
|
|
31
|
+
| **MiniMax M3** | MiniMax | **~$0.0093** | **29.2** | $0.60 (≤512K) / $1.20 (>512K) | $0.12 (≤512K) / $0.24 (>512K) | $2.40 (≤512K) / $4.80 (>512K) | ~$0.27 | 1M |
|
|
32
|
+
| **MiniMax M3 Priority** | MiniMax | **~$0.0139** | **29.2** | $0.90 (≤512K) / $1.80 (>512K) | $0.18 (≤512K) / $0.36 (>512K) | $3.60 (≤512K) / $7.20 (>512K) | ~$0.41 | 1M |
|
|
33
|
+
| **Gemini 3.8 Flash** | Google | **~$0.0183** | **40.9** | $0.75 | $0.075 | $3.75 | ~$0.75 | 1M |
|
|
34
|
+
| **GLM 5.3** | Z.ai | **~$0.0254** | **44.8** | $1.40 | $0.26 | $4.40 | ~$1.14 | 1M |
|
|
35
|
+
| **DeepSeek V4 Pro 0813** | DeepSeek | **~$0.0294** | **36.0** | $1.32 | $0.044 | $3.96 | ~$1.06 | 1M |
|
|
36
|
+
| **Qwen 3.8 Max (0803)** | DashScope | **~$0.0300** | **53.4** | $2.00 | $0.25 | $6.00 | ~$1.60 | 1M |
|
|
37
|
+
| **Grok 4.7** | xAI | **~$0.0345** | **46.4** | $2.00 | $0.50 | $6.00 | ~$1.60 | 500K |
|
|
38
|
+
| **Qwen 3.8 Max (0902)** | DashScope | **~$0.0352** | **45.4** | $2.00 | $0.25 | $6.00 | ~$1.60 | 1M |
|
|
39
|
+
| **Grok 4.6** | xAI | **~$0.0361** | **44.3** | $2.00 | $0.50 | $6.00 | ~$1.60 | 500K |
|
|
40
|
+
| **GPT-5.6 Terra** | OpenAI | **~$0.0523** | **42.1** | $2.00 | $0.20 | $12.00 | ~$2.20 | 1M |
|
|
41
|
+
| **Claude Sonnet 5** | Anthropic | **~$0.0524** | **38.2** | $2.00 | $0.20 | $10.00 | ~$2.00 | 1M |
|
|
42
|
+
| **MiMo V2.6 Pro UltraSpeed** | Xiaomi | **~$0.0658** | **46.3** | $4.35 | $0.036 | $8.70 | ~$3.05 | 1M |
|
|
43
|
+
| **Kimi K3** | Moonshot | **~$0.0688** | **43.6** | $3.00 | $0.30 | $15.00 | ~$3.00 | 1M |
|
|
44
|
+
| **GPT-5.6 Sol** | OpenAI | **~$0.0851** | **47.0** | $4.00 | $0.40 | $20.00 | ~$4.00 | 1M |
|
|
45
|
+
| **Claude Opus 5** | Anthropic | **~$0.0984** | **50.8** | $5.00 | $0.50 | $25.00 | ~$5.00 | 1M |
|
|
46
|
+
| **Claude Fable 5.1** | Anthropic | **~$0.1873** | **53.4** | $10.00 | $0.25 | $50.00 | ~$10.00 | 1M |
|
|
47
|
+
| **GPT-6 Astra** | OpenAI | **~$0.1898** | **52.7** | $10.00 | $1.00 | $50.00 | ~$10.00 | 1M |
|
|
48
|
+
| **Claude Fable 5** | Anthropic | **~$0.2016** | **49.6** | $10.00 | $1.00 | $50.00 | ~$10.00 | 1M |
|
|
49
|
+
| **MiMo V2.6 Flash** | Xiaomi | — | — | $0.14 | $0.0028 | $0.28 | ~$0.10 | 1M |
|
|
92
50
|
|
|
93
51
|
Cost per intelligence = estimated session cost ÷ Intelligence Index score. Session cost assumes ~10K input + ~2K output tokens per turn, 50 turns.
|
|
94
52
|
|
|
95
53
|
> **Notes:**
|
|
96
54
|
>
|
|
97
|
-
> - **DeepSeek** input pricing shown is the **peak cache miss** price. Peak cache hits are $0.006/M for V4.1 Flash and $0.044/M for Pro; off-peak rates are half. See
|
|
98
|
-
> - **MiMo** input pricing shown is the **cache miss** price. Cache hits are essentially free for V2.
|
|
55
|
+
> - **DeepSeek** input pricing shown is the **peak cache miss** price. Peak cache hits are $0.006/M for V4.1 Flash and $0.044/M for Pro; off-peak rates are half. See the [DeepSeek pricing page](https://api-docs.deepseek.com/quick_start/pricing) for the full schedule.
|
|
56
|
+
> - **MiMo** input pricing shown is the **cache miss** price. Cache hits are essentially free for V2.6 Pro ($0.0036/M, ~120× cheaper), V2.6 Flash ($0.0028/M, ~50× cheaper), and V2.6 Pro UltraSpeed ($0.036/M, ~120× cheaper). A Xiaomi price cut took effect on 2026-05-27.
|
|
99
57
|
> - **Anthropic (Claude)** models also have a cache write cost ($6.25/MTok for Opus, $3.75/MTok for Sonnet, $1.25/MTok for Haiku). Opus 5, Sonnet 5, and Fable 5 / 5.1 use a new tokenizer that produces approximately 30% more tokens for the same text.
|
|
100
58
|
> - **OpenAI** models support cached input at 0.1× base input rate.
|
|
101
59
|
> - **Qwen** models use **tiered pricing** — determined by total input tokens per request. Prices above are for non-thinking mode.
|
package/lib/mimo-rewrite.mjs
CHANGED
|
@@ -46,12 +46,10 @@ export function rewriteMiMo(payload, { disableThinkingWithTools = true } = {}) {
|
|
|
46
46
|
hasToolsArray ||
|
|
47
47
|
(toolChoice !== undefined && toolChoice !== 'none' && toolChoice !== null)
|
|
48
48
|
const hasTools = hasActiveToolCall
|
|
49
|
-
const model = String(payload.model ?? '').toLowerCase()
|
|
50
|
-
const isV26 = model.startsWith('mimo-v2.6')
|
|
51
49
|
const incomingThinkingType = payload?.thinking?.type
|
|
52
|
-
const missingReasoningContent =
|
|
50
|
+
const missingReasoningContent = hasMissingReasoningContent(messages)
|
|
53
51
|
const shouldDisableThinking =
|
|
54
|
-
disableThinkingWithTools && hasTools &&
|
|
52
|
+
disableThinkingWithTools && hasTools && missingReasoningContent
|
|
55
53
|
|
|
56
54
|
if (shouldDisableThinking) {
|
|
57
55
|
payload.thinking = { type: 'disabled' }
|
|
@@ -68,7 +66,6 @@ export function rewriteMiMo(payload, { disableThinkingWithTools = true } = {}) {
|
|
|
68
66
|
|
|
69
67
|
return {
|
|
70
68
|
summary: summarizePayload(payload, hasTools, {
|
|
71
|
-
isV26,
|
|
72
69
|
missingReasoningContent,
|
|
73
70
|
incomingThinkingType,
|
|
74
71
|
rewrittenThinkingType
|
package/package.json
CHANGED
package/proxy/mimo-proxy.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { rewriteMiMo } from '../lib/mimo-rewrite.mjs'
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Supported model scope for this proxy:
|
|
9
|
-
* - Validated with the MiMo V2.6
|
|
9
|
+
* - Validated with the MiMo V2.6 chat model IDs.
|
|
10
10
|
* - Expected to work for any MiMo model that supports the `thinking` object
|
|
11
11
|
* with a `type` field on the OpenAI-compatible surface.
|
|
12
12
|
* - Not intended for non-MiMo providers, because the rewrite assumes
|
|
@@ -31,8 +31,7 @@ if (process.argv.includes('--help')) {
|
|
|
31
31
|
|
|
32
32
|
Starts a local HTTP proxy that preserves MiMo V2.6 thinking when the request
|
|
33
33
|
history includes reasoning_content, and falls back to thinking: { type: "disabled" }
|
|
34
|
-
when a tool loop has missing reasoning history.
|
|
35
|
-
disabled-thinking fallback for tool-enabled requests.
|
|
34
|
+
when a tool loop has missing reasoning history.
|
|
36
35
|
|
|
37
36
|
Environment variables:
|
|
38
37
|
MIMO_PROXY_PORT Local listen port. Default: 3459 (falls back to PORT)
|
|
@@ -40,8 +39,8 @@ Environment variables:
|
|
|
40
39
|
Default: https://api.xiaomimimo.com/v1/chat/completions
|
|
41
40
|
MIMO_PROXY_DISABLE_THINKING_WITH_TOOLS
|
|
42
41
|
Enable the tool-loop fallback that injects thinking:
|
|
43
|
-
{ type: "disabled" } for
|
|
44
|
-
|
|
42
|
+
{ type: "disabled" } for incomplete reasoning history.
|
|
43
|
+
Default: 1
|
|
45
44
|
MIMO_PROXY_LOG Path to the redacted NDJSON log file.
|
|
46
45
|
|
|
47
46
|
Suggested VS Code model URL:
|