MiniMax Copilot
A GitHub Copilot Chat
language model provider that adds MiniMax M3 and M2.7 to the
Copilot model picker. Backed by a Token Plan
API key.
Architecture ported from
deepseek-v4-for-copilot
(MIT) and adapted to the MiniMax Anthropic-compatible API.
What you get
- M3, M2.7, M2.7-highspeed in the Copilot model picker, with
per-model context, output cap, and pricing shown in the tooltip.
- Image input on M3 (native multimodal) and a vision proxy fallback
for M2.x so image attachments work on every model.
- Tool calling with an optional experimental cache-stabilisation
switch that keeps the upstream prompt cache warm.
- Git commit message generation wired into the SCM input box.
Conventional-Commits + gitmoji by default; drafts in place of
whatever you had typed.
- Per-model sampling controls — set
temperature, topK, etc.
per model without editing code.
- Cumulative usage tracker — input / output / cache-read tokens
across the whole extension lifetime, with a status command.
- Usage dashboard — a one-click webview (status-bar entry + a
command) that renders today / 7-day / 30-day token usage, a
30-day bar chart, per-model breakdown, and the platform
coding_plan/remains data (5h reset, weekly limit, subscription
expiry) when an API key is configured. The counter updates live
as new requests land.
- Diagnostics — per-request classifier, cache-hit stats, and a
verbose mode that dumps every request to disk.
- Bilingual UI that follows the VS Code display language.
Requirements
- VS Code 1.111.0+
- MiniMax Token Plan
subscription and API key
- VS Code Insiders is required to render MiniMax thinking blocks via
the proposed
languageModelThinkingPart API
- The built-in Git extension must be enabled for the commit-message
generator
Quick start
- Grab a Token Plan API key from
Account / Token Plan.
- Run MiniMax: Set API Key from the command palette.
- Pick a model in the Copilot model picker. Run
MiniMax: Show Pricing to compare costs.
- Done — chat with the model directly in Copilot Chat, or use
MiniMax: Generate Commit Message in the SCM input box.
Models
| Model |
Context |
Effective input |
Output |
Image input |
Notes |
| MiniMax M3 |
1,000,000 |
512,000 |
512,000 |
✅ (native) |
Frontier coding model |
| MiniMax M2.7 |
204,800 |
196,608 |
131,072 |
✅ (via vision proxy) |
Self-iterating, ~60 TPS |
| MiniMax M2.7-highspeed |
204,800 |
196,608 |
131,072 |
✅ (via vision proxy) |
Same quality, ~100 TPS |
M3 1M context note: the >512K input tier is in limited rollout
and the API rejects requests with max_tokens > 512_000. The
effective input is capped at 512K until the rollout completes.
Historical models: M2.5 / M2.1 / M2 are no longer recommended
by MiniMax and are not shipped. Power users can re-add them via
minimax.modelIdOverrides + minimax.visibleModels.
Pricing (per million tokens, USD)
The prices below match the international billing site
platform.minimax.io
(https://api.minimax.io/anthropic). The Chinese mirror
(platform.minimaxi.com,
https://api.minimaxi.com/anthropic) charges in CNY at different
rates — see README.zh.md for that table.
The picker tooltip and MiniMax: Show Pricing both render the
table that matches the active minimax.apiBaseUrl.
| Model |
Input |
Output |
Cache read |
Cache write |
| MiniMax M3 (≤512K input) |
$0.60 |
$2.40 |
$0.12 |
— |
| MiniMax M3 (>512K input, limited) |
$1.20 |
$4.80 |
$0.24 |
— |
| MiniMax M2.7 |
$0.30 |
$1.20 |
$0.06 |
$0.375 |
| MiniMax M2.7-highspeed |
$0.60 |
$2.40 |
$0.06 |
$0.375 |
The M3 >512K input tier is in limited rollout and the API rejects
requests with max_tokens > 512_000. The effective input is capped
at 512K until the rollout completes. Token Plan subscription is
billed separately.
Configuration
| Setting |
Default |
Purpose |
minimax.apiBaseUrl |
https://api.minimaxi.com/anthropic |
Anthropic-compatible base URL. Use https://api.minimax.io/anthropic for international users. The SDK appends /v1/messages. Auto-picked on first activation when unset. |
minimax.visibleModels |
all M-series |
Restrict which models appear in the picker. |
minimax.maxTokens |
0 |
Output cap. 0 lets the model decide. Hard cap: 131072 for M2.7, 512000 for M3. |
minimax.commitModel |
MiniMax-M2.7 |
Model used by MiniMax: Generate Commit Message. |
minimax.sampling |
{} |
Per-model temperature / topP / topK / frequencyPenalty overrides. See Per-model sampling. |
minimax.experimental.modelDefPresets |
{} |
Per-model escape hatch for request body fields. See Per-model sampling. |
minimax.debugMode |
minimal |
minimal / metadata / verbose (verbose dumps every request to disk). |
minimax.modelIdOverrides |
identity |
Map picker IDs to API IDs (useful for proxies). |
minimax.visionModel |
auto |
Vision proxy for non-M3 models. Has no effect on M3. |
minimax.visionPrompt |
see package.json |
Custom vision proxy prompt. |
minimax.experimental.stabilizeToolList |
false |
Synthesise preflight tool calls to keep the upstream prompt cache warm. Experimental. |
Commands
| Command |
Purpose |
| MiniMax: Set API Key |
Store the Token Plan key in SecretStorage |
| MiniMax: Clear API Key |
Remove the stored key |
| MiniMax: Show Provider Status |
One-screen summary of the current configuration + last request usage |
| MiniMax: Show Usage |
Per-model cumulative token usage since the extension was first activated |
| MiniMax: Reset Usage |
Zero out the cumulative usage counters |
| MiniMax: Show Pricing |
Open the pricing table in a Markdown preview |
| MiniMax: Set Vision Proxy Model |
Pick a non-MiniMax model for image captions |
| MiniMax: Generate Commit Message |
Fill the SCM input box with a Conventional-Commits-style draft of the staged diff |
| MiniMax: Set Commit Model |
Switch the model used by Generate Commit Message |
MiniMax: Switch to Global API (minimax.io/anthropic) |
Switch to the international Anthropic endpoint |
MiniMax: Switch to Chinese API (minimaxi.com/anthropic) |
Switch to the China Anthropic endpoint |
| MiniMax: Show Logs |
Focus the MiniMax output channel |
| MiniMax: Open Request Dumps Folder |
Reveal verbose request dumps |
| MiniMax: Open Usage Dashboard |
Open the usage dashboard (today / 7-day / 30-day tokens, per-model breakdown, 30-day bar chart, platform coding_plan/remains data) |
Per-model sampling
Two configuration knobs let you tweak the sampling parameters and
request body per model ID without editing code:
// settings.json
"minimax.sampling": {
"MiniMax-M2.7": { "temperature": 0.2, "topK": 40 },
"MiniMax-M3": { "topK": 80 }
},
"minimax.experimental.modelDefPresets": {
"MiniMax-M3": { "service_tier": "auto" }
}
temperature and topP are ignored when the model is in
thinking: adaptive mode (Anthropic's constraint).
topK and frequencyPenalty are always honoured.
modelDefPresets is an escape hatch — any key you put there is
merged into the request body verbatim (after the standard fields).
Eleven reserved keys are rejected; tools is concatenated rather
than replaced.
Git commit message generation
Run MiniMax: Generate Commit Message (also available from the ⋯
menu on the right of the SCM commit-message input box) to fill the
input box with a draft. The generator:
- Reads the staged changes via VS Code's built-in Git extension;
falls back to working-tree changes when nothing is staged.
- Caps the diff at 32 KB and the file list at 80 entries.
- Treats existing text in the input box as a draft to polish instead
of starting from scratch.
- Emits Conventional-Commits-style messages
(
<type>(<scope>)<!>: <subject> + optional bullet body) with
temperature: 0.2 and max_tokens: 256 for a reproducible first
draft.
The model is selected by minimax.commitModel (default
MiniMax-M2.7). Switch to MiniMax-M3 when the diff is hairy enough
to benefit from deeper reasoning.
Thinking mode
MiniMax's Anthropic-compatible endpoint exposes a binary
thinking: { type: "disabled" | "adaptive" } toggle — there is no
user-facing effort knob. The extension always sends
adaptive for thinking-capable models (M3) and skips the field
entirely for M2.x (whose reasoning surfaces as <think>…</think>
inside the text content). Forcing temperature: 1 and dropping
top_p whenever thinking is on is the Anthropic constraint, not a
choice.
Usage dashboard
Click the $(graph) MiniMax … item in the VS Code status bar, or run
MiniMax: Open Usage Dashboard, to open a side-panel webview that
combines two data sources:
- Local token accounting — every request the extension makes is
recorded into a persistent counter. The dashboard aggregates it
into three windows: Today, Last 7 days, and Last 30
days, with separate columns for
Input, Cache read,
Cache write, Output, and Requests. A 30-day bar chart and a
per-model breakdown table are rendered below the windows. The
counter updates live: every new request the chat provider makes
bumps the day bucket and the dashboard re-renders without a
manual refresh.
- Platform Token Plan — when an API key is configured, the
dashboard also calls
GET /v1/api/openplatform/coding_plan/remains
and renders the 5-hour reset window, the weekly limit, the
per-model quota table, and the subscription expiry date.
Failures (401, network, malformed payload) are surfaced as a
yellow banner; the local counters above remain accurate. The
host (minimaxi.com vs minimax.io) is auto-picked from
minimax.apiBaseUrl.
The dashboard has a Reset counters button that clears the local
Memento after a confirmation prompt; the platform data cannot be
reset from the extension.
Status-bar quota items
Two extra status-bar items live to the right of the daily-token
counter so you can see your plan usage at a glance without opening
the dashboard:
$(bolt) 5h 73% — 5-hour reset window, remaining percent
$(calendar) Week 11% — weekly limit, remaining percent
The colour follows the statusBarItem.remoteBackground /
warningBackground / errorBackground theme tokens (green when
plenty left, red when low), so the bar stays legible in both light
and dark themes. Hovering shows a X / Y · resets in Hh Mm summary
that mirrors the dashboard's quota card; clicking the item opens the
dashboard. Without an API key both items render a muted em-dash
placeholder and the tooltip nudges you to run
MiniMax: Set API Key.
Both items are driven by the same in-process plan cache as the
dashboard (fetchPlanUsage's 8s TTL still applies), so opening the
dashboard or letting the status bar refresh does not add a second
HTTP call.
Endpoint auto-selection
On first activation, if minimax.apiBaseUrl is still at its factory
default, the extension picks an endpoint from the VS Code display
language:
zh* (zh-cn, zh-tw, zh-hk, zh-sg, …) → China
https://api.minimaxi.com/anthropic.
- Anything else → international
https://api.minimax.io/anthropic.
Once you set minimax.apiBaseUrl manually or invoke
MiniMax: Switch to Global/Chinese API, the auto-selection is
never re-applied.
Troubleshooting
- No models in the picker — run MiniMax: Show Provider Status
to see whether an API key is set and which models are visible.
- HTTP 404 from the gateway — make sure
minimax.apiBaseUrl
points at a MiniMax Anthropic-compatible host (api.minimaxi.com/anthropic
or api.minimax.io/anthropic), not a third-party proxy that
expects the OpenAI protocol.
- "API key not configured" — run MiniMax: Set API Key;
the key is stored in VS Code SecretStorage, not in
settings.json.
- Empty commit-message draft — the diff may be larger than
32 KB. Run MiniMax: Show Logs to see what the generator saw.
License
SATA 2.0 (Star And Thank Author License). Chinese translation in
LICENSE_zh.