DeepSeek Harness Plugin

JeffTsuiCUG/dsh-connect-minimaxcode

Stars ★ 7 Downloads (30d) 6,616 Category Models & Providers Added 2026-10-19 npm dsh-connect-minimaxcode

Connects the MiniMax Code models to DSH - reusing the desktop app's sign-in or signing in on its own - with Anthropic-compatible model access, a live model catalog, the daily check-in that grants the free credits, and a credit balance that follows the model you selected.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-connect-minimaxcode

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:JeffTsuiCUG/dsh-connect-minimaxcode

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

DSH Connect MiniMax Code (dsh-connect-minimaxcode)

Bring the models of the MiniMax Code desktop app (China region), already signed in on this machine, into DeepSeek Harness (DSH). Install it and it works — there is no API key to configure.

CI

简体中文 | English

Inspiration

The community established the route this plugin follows: a model already signed in on a desktop app can be moved into DSH with zero configuration — no handling of accounts or passwords, no new authentication scheme; it just attaches a provider to the login state the machine already has and reuses DSH's built-in provider adapter. This plugin applies the same approach to MiniMax Code:

Sibling plugins This plugin
Data source Local login state of their own desktop app Local login state of the MiniMax Code desktop app
Integration Registers a DSH provider and exposes the already-signed-in models Same
Catalog source Live model list from upstream Same

Several implementations exist in the same direction; for how the plugin is structured and how the provider is registered, this plugin follows dingminhua/dsh-connect-workbuddy and the same author's dsh-connect-trae.

These projects are developed independently and are not affiliated with this one. This plugin's directory layout and cordis.patch.yml follow the existing conventions of the DSH plugin structure.


⚠️ Important notice (read this first)

  • This project is for learning and research only. It is not aimed at production use and comes with no commercial support.
  • This is an unofficial plugin. It is not affiliated with MiniMax or DeepSeek, and is not endorsed or authorized by either of them.
  • The plugin only reads the credentials of the MiniMax Code account already signed in on your own machine, and only drives your own account on your own computer.
  • Do not use this plugin for commercial purposes, beyond reasonable personal use, or for any bulk / multi-account / limit-evasion purpose.
  • The plugin depends on undocumented (non-public) MiniMax client APIs. When MiniMax updates its client, those APIs may change and the plugin may stop working.
  • You are responsible for complying with the MiniMax Terms of Service. You bear all consequences of using this plugin (account restrictions, quota resets, service interruption, and so on).
  • The authors of this project are not liable for any direct or indirect loss caused by the use or misuse of this plugin.

Highlights

  • Zero configuration: the login state of the MiniMax Code desktop app is read automatically, and no plaintext token is ever stored in DSH
  • Dynamic model catalog: pulled live from the upstream API, so upstream adding or removing models needs no plugin update
  • Credit balance at a glance: the pill in the composer tool row (beside the model picker) shows the remaining MiniMax Code credits and the consumption accumulated on this machine
  • Live usage accounting: the token usage of every request is taken from the upstream response itself, and can be converted to an equivalent cost using the official price list
  • Reuses the official adapter: upstream speaks the standard Anthropic Messages protocol, so DSH's built-in provider is reused as is; tool calls, reasoning blocks and context compaction are all handled by DSH
  • Works without the desktop app: the plugin can sign in on its own with the OAuth device code flow; you confirm in your own browser and the plugin never sees a password
  • Daily check-in: MiniMax Code grants credits every day and the desktop app does not claim them for you; the plugin shows the seven-day cycle and can claim the day's grant
  • Read-mostly: apart from "refreshing an expired desktop app login state" and the sign-in you start yourself, the plugin does not write to or modify any MiniMax file
  • Follows the selected model: the balance sits in the composer tool row beside the model picker, and is drawn only while a MiniMax model is selected — picking another connector's model hides it entirely instead of misleading you with MiniMax's balance
  • An icon and two languages of its own: a 48×48 SVG ships with the package, so the plugin page no longer shows the default placeholder; the title and the introduction come in Chinese and English, and the interface follows the host's language
  • Image input: models whose catalog entry declares the image input modality (M3, M3.1-Flash) take pictures directly; the host's attachment service reads the image into request bytes, and the plugin only has to connect the durable reference to it

Prerequisites

Either:

  1. The MiniMax Code desktop app (China region) installed and signed in — the plugin reuses its sign-in (the easy way)
  2. Nothing installed — press "Sign in to MiniMax Code" on the plugin page; the plugin starts an OAuth device code flow and you confirm with your own MiniMax account in a browser (this needs account.minimax.cn to be reachable)

Plus DSH desktop (built-in core >=0.1.6-alpha.2 <0.3.0, see engines.dsh in package.json; tested on 0.2.2-rc.1) or the Web profile.

Sending a picture needs the host's attachment service: the plugin does not read images itself — the host's durable attachment service turns a stored reference into request bytes, and the plugin only connects the two. On a host without that service the plugin still loads and text still works; only image requests are refused (pi-ai image input requires the durable attachment service).

Compatibility: the oldest DSH this works on

The oldest supported DSH is 0.1.6-alpha.2 — that is the range in engines.dsh. The plugin used to declare 0.2.1-rc.2, which was a conservative floor rather than a technical one; this time the host packages' published history was searched, and the floor moved down to the version where each feature actually exists.

The host publishes its own packages under the same version numbers as the desktop (DSH 0.2.2-rc.1 ships 0.2.2-rc.1 packages), so "which release first had this API" can be answered straight from npm. Every row below was read out of that version's published source:

Host capability First version What the plugin uses it for
llm.registerAdapter 0.0.1-rc.1 registering the MiniMax Code provider
webServer.register (kind: 'exact') 0.0.1-rc.1 the status, action, generation and capability routes
attachments.saveImage 0.0.1-rc.1 storing a generated picture as an attachment
client slots / sessions services 0.0.1-rc.3 the credit pill and the composer tool row
conversation.input.left slot 0.0.1-rc.1 where the pill and the generate entry sit
dsh.client.inject / immediately 0.0.1-rc.1 loading the client half
session.beginSubmission / binding() / scope() 0.1.2-alpha.2 the picture going out and showing up in the conversation
inputActions.addAttachments / conversation.createDrafts 0.1.3-alpha.2 the picture going into the input box (the draft channel)
plugins.bundle.config slot 0.1.6-alpha.2 the plugin page (generation panel, check-in switch, the full bill)
cordis.patch manifest patch 0.1.6-alpha.2 offering the provider in the model picker without changing the default

The last two rows are the real floor. The plugin page and the manifest patch both begin at 0.1.6-alpha.2; older hosts only have the plugin manager's own settings.plugin.item — a card inside the settings section, on a keyed slot — which is not a plugin page.

What an older host still gets

The plugin is not useless on an older host; it gives up one thing at a time. That is also why the floor sits at 0.1.6-alpha.2 rather than lower: the plugin page is the plugin's main surface (the H3 generation panel, the check-in switch and the detailed balance all live there), and claiming support while it is missing would be a lie.

Host version What still works What is missing
>= 0.1.6-alpha.2 everything ——
0.1.3-alpha.2 – 0.1.6-alpha.1 the models, the credit pill, the generate entry in the composer, a picture reaching the conversation no plugin page (the generation panel and the check-in switch live there); the manifest patch has no effect, so the model must be picked by hand
0.1.2-alpha.2 – 0.1.3-alpha.1 less again: the picture can still be sent straight through the session no draft channel (createDrafts / addAttachments did not exist yet)
< 0.1.2-alpha.2 the text models and the credit display a picture reaches the model but does not show in the conversation (no local echo, beginSubmission)

A host that does not know a manifest field ignores it (the manifest is not validated strictly), so an old host does not refuse the plugin over cordis.patch — it merely has no effect.

This table was read out of the published history of every host package on npm, version by version — not estimated.

And it does not stop at an inference: this repository's lockfile resolves the host packages to 0.1.6-alpha.2, so every release compiles, builds and runs the whole suite against that oldest host — the floor is verified on every release, not concluded once. The method is written down in the repository: pull each host package at each version and look for the API in the source it shipped.

Installation

Option 1: install from the Git repository (recommended, gets the latest code)

dsh plugin --profile desktop add github:JeffTsuiCUG/dsh-connect-minimaxcode

Option 2: install from npm (available once published)

dsh plugin --profile desktop add dsh-connect-minimaxcode

For the Web profile, replace --profile desktop with --profile web.

Installing a locally modified clone: do not pass a directory path to dsh plugin add — pnpm installs it as a link and nests dependency symlinks inside the plugin's own node_modules; the host's plugin sandbox gets EPERM stat-ing those links and the plugin fails to activate (failed to import). Pack a tarball first, then install the tarball so dependencies resolve in the profile root node_modules like a registry install:

pnpm pack
dsh plugin --profile desktop add ./dsh-connect-minimaxcode-0.5.6.tgz

The desktop profile is owned exclusively by the Electron app. If the dsh command is not on your PATH, use the carrier CLI bundled with the DSH app (the path depends on the install location, for example <DSH install dir>\resources\runtime\cli\bin\dsh.cmd).

After installing, the plugin hot-reloads, and the models then show up under the MiniMax Code group in the model picker.

The credit pill and the plugin page card are browser-side plugins, so the first install, or an upgrade to 0.3.0 or later, requires one DSH restart before they appear (the model route itself does not need a restart).

If the install is blocked by allowBuilds

This repository commits the build output lib/, so a normal install does not trigger a build. If you see:

[ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED] Failed to prepare git-hosted package

it means you are on a commit older than 0.2.1 (those versions did not commit lib/ yet). Two ways out:

  • Pin a version with the syntax above: github:JeffTsuiCUG/dsh-connect-minimaxcode#v0.2.1
  • Or add the allowBuilds entry pnpm suggests to that profile's pnpm-workspace.yaml and retry

Usage

  1. Confirm the desktop app is signed in Open the MiniMax Code desktop app and check that you are signed in. The plugin reads the local login state that the app writes.

  2. Install the plugin (with the command above) and wait for the hot reload to finish.

  3. Pick a model Open the DSH model picker and choose a model under the MiniMax Code group. The available models come from the live upstream catalog, for example M3, M3.1-Flash.

  4. Chat as usual Just use it. Tool calls are executed by DSH's local tools; the plugin only provides the model channel.

  5. Sign in again when the token expires MiniMax Code has two login states that are not interchangeable, and this plugin uses one of each:

    Credential Location Lifetime Used for
    JWT ~/.minimax/local-runtime.auth.json about 15 days Model gateway (/mavis/api/v1/llm/v1/messages)
    OAuth (mmoat_) ~/.minimax/auth/prod/<region>/mcode-public/auth.json about 1 hour Account and credit reads (/matrix/api/v1/commerce/get_membership_info)

    The two credentials are not interchangeable: the JWT gets 401 on every account API call, and the OAuth token does not work against the model gateway. Model traffic uses the JWT, the credit display uses OAuth.

    Symptom Meaning What to do
    Everything works Both credentials are valid —
    The model reports an auth error The JWT has expired Sign in again in MiniMax Code, then restart DSH
    The credit pill says "login state expired" The OAuth token expired The plugin refreshes it with the app's own refresh token and writes it back; if the refresh fails, open the MiniMax Code desktop app once and let it refresh itself

    An expired OAuth token does not affect model traffic: the JWT is still valid and the model works as usual — only the credit pill cannot fetch a balance for a while.

    The refresh rotates the refresh token. The plugin therefore writes the new token pair back to the same file atomically, in the client's original format, and leaves generation unchanged — the client relies on it to decide "does this credential still belong to the current login", and raising it on its own would make the desktop app think the login came from another machine.

About response latency

These MiniMax models require reasoning before any output and cannot turn it off. Therefore:

  • There is a wait before the first character appears (measured: about 3 seconds for M3.1-Flash)
  • The reasoning is streamed back live as thinking blocks, so you can see the model "thinking" in the interface
  • This is the model's own behaviour, not latency caused by the plugin

If you care more about the immediacy of streaming feedback, keep one of DSH's official models or another provider as a fallback.

How it works

  1. Read ~/.minimax/local-runtime.auth.json (the plaintext login information the MiniMax Code app writes) and parse its JWT in memory only
  2. Call GET /mavis/api/v1/models to fetch the live model catalog (including context length, multimodal support, tool calling and other capability declarations)
  3. Register the minimaxcode provider, pointing at POST /mavis/api/v1/llm/v1/messages (the standard Anthropic Messages protocol)
  4. Read the OAuth token from ~/.minimax/auth/prod/<region>/mcode-public/auth.json and refresh it when needed
  5. Call POST /matrix/api/v1/commerce/get_membership_info for the credit balance, and hand it to the UI pill through the plugin's own status endpoint /plugins/dsh-connect-minimaxcode/status

Three compatibility fixes for the gateway

These are the differences that had to be handled in practice, and they are the main reason this plugin is not "just a different URL and it works":

# Symptom Fix
1 The gateway only accepts Authorization: Bearer, while pi-ai sends x-api-key by default; the latter on its own returns 401 token is required Attach an Authorization header to the model descriptor (the gateway accepts both headers)
2 The Anthropic SDK appends /v1/messages to baseUrl itself; if baseUrl already ends with /v1, the request path becomes /v1/v1/messages and the gateway returns 503 direct_route_not_configured Cut baseUrl before the version segment and let the SDK complete it
3 Every model requires reasoning, and "disable reasoning" makes pi-ai send thinking: {type: "disabled"}, which the gateway rejects with 400 ... requires adaptive thinking Mark the "off" level as unsupported so the field is omitted (which the gateway accepts)

The plugin contains no hardcoded token, account or API key.

Signing in without the desktop app

The plugin can sign in on its own, using the same OAuth 2.0 device authorization grant (RFC 8628) the desktop app uses:

  1. The plugin asks account.minimax.cn/oauth2/device/code for a device code and gets an eight-character user code and the page to authorize it.
  2. You open that page, sign in to your own MiniMax account, and approve the request.
  3. The plugin polls oauth2/token and receives the mmoat_ token and a refresh token.

What this means in practice:

  • The plugin never sees a password or a verification code — the only human step happens in your own browser, on the account site's own page.
  • PKCE is used, so a leaked device code cannot be redeemed without the verifier that never leaves the process.
  • One token is enough: the mmoat_ token works against the model gateway (agent.minimax.cn/mavis/api/v1/llm) and the account endpoints (credits, check-in), so one sign-in covers all of it.
  • The desktop app's files are left alone. The plugin keeps its own credential in ~/.dsh/.minimaxcode-auth.json (mode 0600, atomic write). The app's two files carry generation counters that must stay in step, and writing there would look like a sign-in somewhere else and force a new one.
  • The refresh token rotates, so the plugin writes the new pair back to its own file and the sign-in keeps working.

The daily check-in

The free credits are granted by a daily check-in, not by signing in. The desktop app has a "每日签到" card, but it does not claim on its own — the card opens and you press the button.

The upstream endpoints are:

GET  /minimax-cloud/api/v1/signin/status?timezone_id=Asia/Shanghai   # the seven-day cycle
POST /minimax-cloud/api/v1/signin/claim?timezone_id=Asia/Shanghai   # claim today's grant

Measured behaviour:

  • The time zone must be an IANA name (Asia/Shanghai). An offset, or none at all, is answered with invalid timezone_id.
  • A cycle runs seven days: 400 / 400 / 400 / 1000 / 400 / 400 / 1000 = 4000 credits.
  • Claimed credits are valid for thirty days (the response's expire_at_ms is exactly thirty days later, at midnight in the account's time zone).
  • The claim is idempotent per day: claiming again answers claim_result: 2 (already claimed) and grants nothing.

The plugin page shows which day of the cycle it is, what that day is worth, and which days are left, and offers two actions:

  • A "Claim" button — you press it and the plugin claims the day's grant.
  • A "Claim daily on its own" switch (off by default) — with it on, the plugin claims once a day, and only when the server itself says the day can be claimed.

The automatic claim is deliberately restrained: it only asks when the upstream says the day is claimable, at most once a day, never concurrently, never around any verification, and it shows the reason when something goes wrong rather than retrying quietly. Please check that this is within MiniMax's terms of service yourself.

Credit balance and usage

The pill in the composer tool row (beside the model picker) shows the remaining MiniMax Code credits; expanding it also shows the granted/purchased split, the consumption between the two reads, and the tokens and equivalent cost accumulated on this machine. The pill appears only while a minimaxcode model is selected.

Where the balance comes from

The MiniMax Code desktop app calls a "membership info" API every day itself, and the response carries the three numbers shown on the app's settings page:

POST https://agent.minimax.cn/matrix/api/v1/commerce/get_membership_info
Authorization: Bearer <the desktop app's mmoat_ OAuth token>
Content-Type: application/json

{}
"op_credit_summary": {
  "total_remaining_amount": "11459.454",      // total remaining credits
  "purchased_remaining_amount": "0",           // of which purchased
  "free_remaining_amount": "11459.454"         // of which granted
}

What the plugin reads is op_credit_summary.total_remaining_amount. Mind the field: total_remains_credit and opcredit_balance in the same response are legacy balances; on accounts that have already migrated to the credit pool they are always 0, so reading them shows "0 credits".

Incidentally, there are three different units of "money" here — do not mix them up:

Value Meaning Shown by this plugin
op_credit_summary.total_remaining_amount Code credit balance ✅ This is the one
token_plan_credit.remaining_credits Purchased credit pool ❌
query_balance.available_amount Open Platform wallet (CNY) ❌

Do credits expire? Yes

Credits are not a single pool but lots granted one at a time, each with its own expiry date. The client grants one lot per day, and each lot expires on the grant date + 30 calendar days (it lapses at 00:00 on that day, in the account's time zone), which forms a 30-day ladder staggered by one day:

GET https://agent.minimax.cn/minimax-cloud/api/v1/credit/details?page_number=1&page_size=100
→ details[] { granted_amount, remaining_amount, consumed_amount, granted_at_ms, expire_at_ms, credit_type }

Measured on this machine, 23 lots: the one granted on 09-20 expires on 10-20, the one granted on 09-21 expires on 10-21, and so on; one granted on 08-25 expires on 2027-08-25 (a one-year lot; credit_type 1 = purchased / 2 = check-in). Always read the expiry date from expire_at_ms instead of hardcoding a number of days — there are at least a 30-day and a 365-day scheme.

Based on that, the plugin shows, in the plugin page (Settings → Plugins → DSH Connect MiniMax Code) and in the pill in the composer tool row:

  • The remaining credits expiring within 7 days, and the expiry date of the most recent lot
  • The remaining credits expiring within 30 days
  • A list of the upcoming expiring lots (date + amount)
  • The balance bar and the consumption on this machine (token count, equivalent cost)

Only lots that still have a balance are counted: a lot that was granted but already spent has nothing left to lose when it expires, and counting it would make every account look "about to expire". Consumption is roughly first-in, first-out, so the "expiring within 7 days" amount is often 0 (the lots that are about to expire are basically used up already), which is why the interface also shows the earliest expiry time — that is the signal that actually means something.

Expiry does not zero out a lot's remaining_amount (in practice a negative residue such as -0.31 is left behind); it excludes the expired lots from the balance instead, so the total comes from the balance API.

The sum of remaining_amount in the ledger is digit-for-digit equal to total_remaining_amount from the balance API while nothing is being spent; the difference seen between two samples is what the account really spent during that window.

How usage is computed

Two sets of data each cover one thing:

  • Real credit consumption: the balance is a live value, so the difference between two reads is the credits actually spent in that window (the client spends concurrently as well, so the difference includes spend from the other clients).

  • Consumption on this machine: every response carries its own usage (input_tokens / output_tokens / cache_creation_input_tokens / cache_read_input_tokens), which the plugin accumulates as is. When converting to money, compute from these four components alone — never use any total_token aggregate, because upstream's two aggregation levels use different bases (they differ by 1.94×, and the difference is exactly the cache-read part). The prices come from the official MiniMax price list:

    Model Input Output Cache read
    MiniMax-M3.1-Flash ¥1.00 / 1M tokens 4.00 0.10
    MiniMax-M3 (≤512k input) 2.10 8.40 0.42
    MiniMax-M3 (>512k input) 4.20 16.80 0.84

    The converted amount is an equivalent cost, not a charge: MiniMax publishes no exchange rate between credits and money (the plans only publish relative multipliers of 1×/3×/12×), so the plugin does not present it as "how many credits were spent".

    The official price list has no separate price for cache writes (cache_creation_input_tokens), so the plugin counts its tokens but does not convert them to money, to avoid quoting a number that has no public basis.

Account usage profile

The account's usage history comes from the open platform's usage summary, and it is a different thing from the token count the pill reports: the latter counts only the requests this host made.

GET https://www.minimaxi.com/backend/account/token_plan/usage_summary?token_type=5&heatmap_days=365&business=Agent&device_platform=desktop
Authorization: Bearer <OAuth 令牌>

The card shows the parts worth acting on:

Field Meaning
current_consecutive_days Days used in a row
active_days / total_days Days with usage in the window / the window's length
total_token_consumed Tokens consumed in the window, in the upstream's own wording (826.14M)
usage_ranking_percent Where the account ranks by usage
most_active_day The busiest day and what it consumed

This data needs no M Plan subscription: the endpoint is an account one, read with the OAuth bearer, unlike the limit windows, which belong to the subscription.

Image and video generation (H3)

The plugin page gained a Generate panel, which drives MiniMax's H3 image model and H3 video generation directly:

  • Images: MiniMax-H3-Image (and MiniMax-H3-Image-Highspeed), with an aspect ratio and a 1K / 2K / 4K area
  • Video: MiniMax-H3-Max (the default) or MiniMax-H3, where the length, the resolution and the aspect ratio are listed for the model that was chosen (H3 takes 4–15 seconds and 2K, H3-Max takes 5–15 seconds and at most 768P; both take 480P / 720P / 768P, but 720P allows only the 16:9 and 9:16 aspect ratios)

Both go through the endpoints the open platform's own documentation gives:

POST https://api.minimax.cn/v1/images/generations          # text to image, synchronous
POST https://api.minimax.cn/v2/video_generation           # create a video task, asynchronous
GET  https://api.minimax.cn/v2/query/video_generation/{id}  # poll the task

No key has to be configured. The generation endpoints want the open platform's API key (sk-cp-…), and that key belongs to the account: the plugin asks token_plan_credit with the OAuth bearer — the endpoint it already reads for the credit balance — and the api_key in the answer is it. Measured on 2026-11-10:

Request Credential Result
/v1/images/generations + sk-cp- key 200, 8.5 s 1184×880 JPEG, 395 KB, 6401 tokens
/v1/images/generations + OAuth bearer 401 1004 login fail the endpoint takes only the API key
/v2/video_generation + sk-cp- key 200, task succeeded after 90 s 5 s 768P clip, 162745 tokens

The generated picture is committed to DSH's own attachment store (ctx.attachments), so it lives in DSH's storage rather than only in this browser tab.

Two differences from the desktop app, stated plainly
  1. Model-picker image generation is bridged through the chat adapter. The host's ctx.llm still exposes only registerAdapter for chat adapters and has no native image output modality. This plugin bridges MiniMax-H3-Image and MiniMax-H3-Image-Highspeed into the model picker as non-reasoning models and intercepts their turns before the chat gateway: it extracts only the real user prompt (filtering out plugin/framework context), intercepts auxiliary session-title / compaction calls so they never spend image quota, saves the generated bytes under ~/.dsh/minimax-images/ and returns a Markdown preview. Selecting an H3 image model also shows an aspect-ratio and resolution (1K / 2K / 4K) pill in the composer toolbar, and individual prompts can override them inline (--ar 16:9, --2k, --n 2). The plugin page and composer Generate panel remain available as before.
  2. Video has no carrier in DSH at all. Across pi-ai, dsh-llm, dsh-attachment and dsh-llm-pi-ai there is not one video-related declaration: no video content block, no attachment media type, no rendering. A video can therefore be generated, watched and downloaded in the panel, but it cannot join a conversation the way a picture can.

A picture can reach a conversation: the host publishes ctx.attachments.admitPromptContent(), so a plugin can complete "generate → store → durable reference" on its own. But the attachment entry point is a browser File upload and there is no attachment library to pick from, so it still has to travel as part of the next prompt. That last hop is done in 0.6.1 (see below).

About token refresh

The OAuth token is valid for about an hour and is refreshed automatically by the client. The plugin only refreshes it once, with the refresh token the app already stored, when its own token has expired, and writes the rotated new tokens back to the same file atomically, in the client's original format (with generation unchanged), so the desktop app's login state is unaffected. The plugin never starts a login, never signs out, and never calls any paid or subscription endpoint.

The conclusion of this section is the opposite of what 0.2.x reported ("the quota cannot be displayed"). The investigation at the time guessed endpoint paths from English semantics like credits / quota / summary, but the real API uses the commerce / membership vocabulary of the billing domain, so every guess missed; the path was later pinned down by reading the URL the desktop app really calls every day out of its own runtime logs (%APPDATA%\MiniMax\logs\api-*.log).

Known limitations

  • Only the China region (agent.minimax.cn) is supported. Whether the international gateway works is unverified — please do not infer that other regions are supported from this.
  • Reasoning must stay enabled. All MiniMax models declare that they need reasoning and it cannot be turned off. The time to first token is therefore higher than for non-reasoning models.
  • The model list is a built-in fallback when you are not signed in. The picker still shows the two built-in entries M3 and M3.1-Flash in that state, but they cannot really be called; once you sign in, the list switches to the live upstream catalog. Judge availability by the result of an actual call.
  • Credits only cover the granted/purchased MiniMax Code credits; they do not include the Open Platform wallet balance or the purchased credit pool, and the plugin never converts money into credits.
  • The balance is an account-level number, so the difference between two reads includes concurrent spend from the other MiniMax Code clients; the consumption of this machine alone is the token count and the equivalent cost in the pill.
  • The equivalent cost is an estimate converted at the public price list, not an actual charge; MiniMax publishes no exchange rate between tokens and credits.
  • When the OAuth token expires the credit pill is temporarily unavailable. With the desktop app's sign-in, open MiniMax Code once and let it refresh itself; with the plugin's own sign-in, the plugin renews it with its refresh token (the server rotates the refresh token, and the plugin writes the new pair back to its own file). This does not affect model traffic.
  • The check-in needs an account that is entitled to it. The check-in is an upstream entitlement; the plugin only presses the button for you. When the server says "not claimable now", the plugin says so — it does not retry or work around it.
  • The automatic claim is off by default, and it only asks when the server explicitly says the day can be claimed, at most once a day. Whether to turn it on, and whether that is within MiniMax's terms of service, is your call.
  • No settings card is provided. The plugin does not register a card on the DSH settings page; the interface it adds is a single pill in the composer tool row (drawn only while this plugin's model is selected) and a small card on the plugin page.
  • The upstream APIs are non-public and may stop working when MiniMax updates its client. If the balance API breaks, the pill shows "credits unavailable", which does not affect model traffic.
  • Image input depends on the host's attachment service. The catalog declares the image modality (M3, M3.1-Flash), but turning a durable attachment into request bytes is the host's job: without that service the plugin still loads and serves text, and only image requests are refused.
  • The context window is declared as the gateway's real ceiling (1,000,000), not the 512,000 in the catalog. Upstream's limit.context is the default window and the billing tier boundary (input above 512k costs more); the largest entry of context_window_options is the ceiling the gateway enforces. Measured on 2026-10-25: 946,206 tokens were served normally, 1,050,000 were refused (invalid params, context window exceeds limit (2013)). Declaring 512,000 meant every turn of a long conversation was reported as pi-ai detected context overflow — while the model had answered perfectly well and the reply was thrown away.
  • The device code flow needs account.minimax.cn to be reachable, and the browser that authorizes it has to be able to sign in to a MiniMax account. On some restricted networks the authorization page cannot be opened.

How to read the version number

The plugin follows semantic versioning, and each level means the same thing — so the version number says what to expect:

Version What it means
patch (x.y.z) a defect is fixed. No new configuration key, no interface change. The existing surface and behaviour stay; one thing that was wrong is now right.
minor (x.y.0) a user-visible capability is added, or the shape of an existing message changes. No interface change; the meaning of the existing configuration keys is unchanged.
major (x.0.0) a breaking change: the meaning of an existing configuration key changes, the surface is rearranged enough to need re-learning, or the host interface it depends on has moved on.

Every entry in the changelog opens with why it is that level, and with what this release deliberately did not do — the boundaries are worth knowing more than the features, so they come first.

Changelog

0.8.0 (2026-11-25)

This is a minor release: it adds one user-visible capability (choosing the video model) and changes the shape of a generation failure's message. No interface changes — the generation block of status only gains fields, and the meaning of every existing key is unchanged.

Added
  • The video model is now a choice: MiniMax-H3-Max or MiniMax-H3, with the former as the default. This is not decoration — measured 2026-11-25, a Go plan is refused MiniMax-H3 outright: submission answers HTTP 402, the task ends failed, and error.code is 2068, "your Token Plan tier does not include this model; upgrade to use it", while four MiniMax-H3-Max tasks all succeeded at the same moment. The panel used to hard-code MiniMax-H3 into the request, so anyone on Go pressed "Generate video" and it failed, every time.
  • The video options are listed for the model that was chosen: H3 takes 4–15 seconds (the panel used to start at 5 and was missing 4) and offers 2K; H3-Max takes 5–15 seconds and stops at 768P. Both take 480P / 720P / 768P. Choose H3-Max and 4 seconds and 2K are no longer offered — it refuses them, and an attempt that is certain to be refused is a button pressed for nothing.
  • 720P appears only with an aspect ratio it accepts: 720P takes 16:9 and 9:16 and nothing else, answering invalid params, resolution 720P only supports ratio 16:9 or 9:16 (2013) for the rest. Choosing 720P narrows the aspect ratios to those two.
  • The adaptive aspect ratio only means something when a first frame is given; a text-only call is refused with t2va … must give an explicit ratio and may not use adaptive, so the panel does not list it.
Fixed
  • A failed task now says why, in the upstream's own words: the task query carries task.error.{code,message}, which the plugin did not read, so a failure could only show a generic "generation failed". The reason is now passed through and shown as it arrived — including the 2068 text above. Note that the code there is the string "2068", not a number; it is normalised before being classified.
  • The plan gate is classified as a plan gate: 402 carries both "out of balance" and "your plan does not cover this", and classifying by error.type (which is insufficient_balance_error in both cases) said "out of balance" every time. The upstream's wording now wins — plan/upgrade words mean "plan", balance/exceeded words mean "quota", and only an unrecognised 402 falls back to "plan".
Deliberately not done
  • H3 is not hidden from accounts that cannot use it. The plugin has no way to read "which models this account may use"; hard-coding "Go cannot use H3" would turn into a new wrong answer the day someone upgrades. Both models are offered and the upstream answers — and its answer is now actually visible.
  • 2K is not offered on H3-Max. It is absent from the set the endpoint itself lists, and never watched to succeed. Better to show one option fewer than one that cannot work.
  • adaptive is not accepted quietly. It holds only for image-to-video, and the panel is text-only for now; it comes back when a first-frame entry does.

0.7.2 (2026-11-20)

The version is patch: "the model catalog stayed on the built-in list and could not say why" is fixed. No new configuration key, no interface change.

  • Fixed "the catalog was read once": the model catalog used to be read only when the plugin started. If the credential was not ready at that moment — the desktop app had not written its file yet, or the token was being renewed — the read never happened and the built-in list was served for the whole session, with no second attempt and no reason to show. Every status read now brings the catalog up to date in the background (with an interval, so a poll never becomes a request storm), and it recovers as soon as the credential is there.
  • The trust interval and the retry interval are now separate: a live list is trusted for five minutes (the upstream rarely changes it and re-reading costs a request); a list that is not live may be re-read every thirty seconds — the retry used to be blocked by the trust interval as well, which amounted to never retrying.
  • The reason for a failure is no longer wiped by the very call that needed it: the fallback is installed first and the reason written after; the other order let the call that replaced the snapshot take the reason with it.

0.7.1 (2026-11-15)

The version is patch: two problems introduced in 0.7.0 are fixed. No new configuration key, no interface change.

  • Fixed "the credit balance disappeared": wiring the display switch in 0.7.0 put useStatus() after the component's conditional return — React tracks hooks by call order, and a hook whose count differs between renders collapses the whole component in a real React. The collapse is what made the balance vanish. The hook now runs before any conditional return. The lesson is pinned: one case asserts the hook-before-return structure, and the balance is verified across the three-render sequence (shown, hidden by provider, back) that used to break. The harness here is a forgiving fake React and cannot reproduce the crash itself — the structural guard is the strongest pin available, and its comment says so honestly.
  • Fixed "the diagnostics section looks wrong": it was a monospaced text dump, out of step with the rounded sub-cards around it. It now matches them: the same rounded box, spanning both columns, ordinary rows of label and value in the regular typeface; only the upstream's own words stay collapsed and monospaced — that is quoted evidence, not a style choice.

0.7.0 (2026-11-15)

The version is minor: a new "Diagnostics" section and a switch for showing the balance in the composer, and a different shape for the message a failed generation shows. No interface change; the meaning of the existing configuration keys is unchanged.

Added
  • A "Diagnostics" section on the plugin page: a read-only list of facts — the plugin version, the region, the upstream hosts, how the plugin is signed in, where the model catalog came from, which pieces of the host it found (eight of them), and the upstream's own words about its most recent failure. The one reason it exists is that it can be copied into an issue as it stands: there is no control in it that changes anything. The host's own version is not in it, because the host does not hand its version to a plugin — a line that had to be guessed would be worse than no line.
  • A "show the credit balance in the composer" switch: on by default. Turning it off hides the balance in the pill and changes nothing else; it can be turned back on at any time.
Changed
  • A failed generation now says three things instead of one: ① what to do (by the kind of failure); ② that this request may already have been charged for (when a video task was submitted and could not be read back); ③ the upstream's own words, collapsed, quoted rather than paraphrased.
  • Failures are classified into credentials / parameters / subscription / quota / rate-limited / upstream / local, each with its own remedy. The classification reads the failure's shape (the HTTP status and the wording) rather than its code — a code is a number some other system chose, and the day it is renamed or withdrawn, a classifier keyed on it would quietly stop matching, while one keyed on what the failure is keeps working.
Deliberately not done
  • The session-title requests are not diverted to a lighter model. The host sends one per new session, and it goes to the main model. Measured (2026-11-15): our upstream catalog holds two models (MiniMax-M3 and MiniMax-M3.1-Flash, both with a 512K context, a 128K output and reasoning), there is no lighter one, and the catalog carries no price field — so there is no way to tell what diverting them would save. A change with no measured evidence behind it is not made.
  • No cooldown for the failures that spent nothing. Only the ones where the upstream may have accepted the work, and may have charged for it, are held back; a bad parameter, a missing sign-in and a request refused locally cost nothing and may be retried at once.
  • No host version in the diagnostics. The host does not offer its version to a plugin; that line could only be guessed.
  • No "drop the tools for this model" fallback. Letting a model quietly lose every tool is harder to notice than an error.
Testing
  • New: tests/failure.spec.ts (9), tests/generation-cost.spec.ts (7), tests/failure-wording.spec.ts (5), tests/diagnostics.spec.ts (6), tests/control-layers.spec.ts (6).
  • Mutation checks: every fix in this release was reverted on its own to confirm the matching case turns red. All seven mutations of the classifier and all four of the cost distinction were caught. One mutation of the cost distinction survived at first — the case exercised the HTTP-failure branch while the mutation changed the "the answer was not JSON" one. Adding a case for that road caught it. It is exactly what "the test passed but was not proving what it claimed" looks like.
  • The protocol findings moved into docs/ (published with the package): H3 generation, the account endpoints, the credentials and the error taxonomy, each fact carrying the date it was measured.

0.6.9 (2026-11-13)

  • The oldest supported DSH moved from 0.2.1-rc.2 down to 0.1.6-alpha.2. The old floor was a conservative value, not a technical one. This release searched the host packages' published history version by version and, for every host capability the plugin uses, found the release it first appeared in.
  • The host publishes its own packages under the same version numbers as the desktop (DSH 0.2.2-rc.1 ships 0.2.2-rc.1 packages), so "which release first had this API" can be answered straight from npm — every row of the compatibility table was read out of the source that host package version actually shipped.
  • Two things set the real floor: the plugins.bundle.config slot the plugin page lives in, and the cordis.patch manifest patch that offers the provider in the model picker. Both begin at 0.1.6-alpha.2. Older hosts only have the plugin manager's own settings.plugin.item — a card inside the settings section, on a keyed slot — which is not a plugin page.
  • Older hosts are not useless, they give up one thing at a time (the README has the full table): from 0.1.3-alpha.2 the models, the credit pill, the generate entry in the composer and a picture reaching the conversation all work, only the plugin page is missing; from 0.1.2-alpha.2 a picture reaches the conversation too, only the draft channel is missing. A host that does not know a manifest field ignores it (the manifest is not validated strictly), so an old host does not refuse the plugin over cordis.patch — it merely has no effect.
  • The peer dependency floors for the host packages moved to >=0.1.6-alpha.2 as well, so an older host's own versions satisfy the range. The lockfile resolves to 0.1.6-alpha.2 — so every release compiles, builds and runs the whole suite against that oldest host, and the floor is verified on every release.
  • The README gained a "Compatibility: the oldest DSH this works on" section (in both languages), with the evidence table and the degradation ladder.

0.6.8 (2026-11-13)

  • The plan tier moved into the Plan box: the tier and the day it ends used to be a row of their own below the two boxes, stretched into a band of empty space. The tier is now the Plan box's headline line, wearing the balance's own big-number size and height (20px), and the day it ends stays the small text it was, on the right and on the tier's baseline; the box itself is named "Plan" rather than "Plan allowance".

  • The grid has no hole any more: the tier row no longer occupies a grid cell, so the check-in and the expiring grants now sit side by side in the second row and both columns are filled — the empty band under the left column and the hole at the bottom right are gone together. The Plan box did not grow by a row either: the tier line takes the place of the invisible number that used to hold the row height open.

  • The tier is still the value the upstream sends (token_plan_tier), not a fixed label: another plan shows its own name, and only an answer without that field falls back to "M Plan subscription".

  • Fixed "Could not send it to the conversation": the session method was never bound. Before this release the composer's Generate an image entry failed every time, reporting "Could not send it to the conversation; generate on the plugin page and dow

…

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.