Preface¶
When integrating third-party models into DeepSeek Harness (DSH), the common practice is to provide your own API Key or set up a reverse proxy. If you have already logged into a subscription using MiniMax Code (Mavis) on your local machine, the account operates on a credit system rather than using a standalone LLM API Key. After closing the desktop client, the access token expires in approximately one hour. If the Harness side lacks renewal logic, the provider will fail after the first 401 error.
The dsh-minimax-connect introduced below (Maintainer: VICqiufeeng, Community Category: Model Inference) reads the existing login state from the local ~/.minimax directory and uses it as a model provider for DSH. The plugin handles OAuth renewal automatically and provides credit management, check-in, and model list management within the settings. The MiniMax inference endpoint itself follows the Anthropic Messages protocol, so DSH’s pi-ai can connect directly to the official URL without requiring an additional reverse proxy process.
What is this¶
dsh-minimax-connect (npm package name dsh-minimax-connect, display name DSH Connect MiniMax, current version 0.1.0, MIT) is a Cordis plugin: it consumes MiniMax Code subscription credits rather than separate API keys. The prerequisite is that you have logged into MiniMax Code at least once on the local machine, with credentials stored at the default path ~/.minimax/auth/prod/cn/mcode-public/auth.json (the plugin README states it is currently primarily validated for Windows + domestic cn region).
Why no reverse proxy is needed¶
The LLM base URL for MiniMax Code is consistent with the official client configuration, for example, in ~/.minimax/config.yaml:
provider:
minimax:
npm: '@ai-sdk/anthropic'
options:
baseURL: https://agent.minimax.cn/mavis/api/v1/llm/v1
Conversations use POST {llm}/v1/messages (Anthropic Messages; streaming includes thinking_delta and text_delta). Authentication uses Authorization: Bearer with an access token starting with mmoat_ (read from auth.json); the Anthropic x-api-key cannot be used (results in 401 in testing). The plugin’s default baseUrl is https://agent.minimax.cn/mavis/api/v1/llm (Note: the base passed to the SDK does not include the trailing /v1; the SDK appends /v1/messages itself).
Core Features¶
Self-renewing Credentials¶
The access token is valid for about 1 hour. After the official client exits, the refresh token remains in the file but is not utilized when no one is renewing it. This plugin proactively refreshes the token 5 minutes before expiration and includes a 60-second inspection loop. It reuses the same on-disk lock and auth.json / auth-state.json generation conventions as the client. Testing confirms bidirectional coexistence with MiniMax Code (end-to-end verification via test/renew-e2e.mjs is possible even when the client process count is 0).
Renewal request (consistent with README):
POST https://account.minimax.cn/oauth2/token
grant_type=refresh_token
refresh_token=<mmort_…>
client_id=mcode-public
scope=agent.default
audience=agent-backend
The settings page displays the auto-renewal status (Enabled / Renewing / Pause Retry / Missing refreshToken requiring re-login, etc.). invalid_grant is treated as a fatal failure, requiring a return to MiniMax Code to log in again.
Credits, Check-in, and Usage¶
The Cloud API base URL defaults to https://agent.minimax.cn/minimax-cloud/api/v1. Plugin calls include, for example:
- Credits:
GET {cloud}/credit/details - Check-in status:
GET {cloud}/signin/status?timezone_id=Asia/Shanghai(timezone_id is required) - Check-in:
POST {cloud}/signin/claim?timezone_id=Asia/Shanghai, body{}
Local loopback routing (local machine only) includes /plugins/dsh-minimax-connect/status, /usage, /checkin, /signin, POST .../signin/claim, etc., which are used by the settings page and the self-contained HTML panel GET /plugins/dsh-minimax-connect/panel.
Model Provider and List¶
Testing GET {llm}/v1/models returns a 503 direct_route_not_configured error, so the model list is parsed from the whitelist and model_order in the local ~/.minimax/config.yaml. Default models include MiniMax-M3, MiniMax-M3.1-Flash-Preview, MiniMax-M2.7, MiniMax-M2.7-highspeed (see the README table for context, image, and reasoning capabilities of each model).
In Settings → MiniMax (order 460), you can toggle models, image input, and context window (200K or 1M). Settings are saved to the llm-minimax namespace. The cost for model descriptors is 0 (credit-based system with no public unit price). Image input depends on the host’s durable attachment service; older hosts may return UNSUPPORTED_CONTENT.
Installation and Enablement¶
The installation command follows the README:
dsh plugin --profile desktop add "github:VICqiufeeng/dsh-minimax-connect"
Instructions:
- The plugin is installed into the profile’s
node_modules, anddsh.profile.bundlesis automatically registered. - Restart DSH for it to take effect.
- No user patch layer is written (does not modify
cordis.patch.yml); to uninstall, simply remove it fromdependenciesanddsh.profile.bundles.
If pnpm reports ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION, you can append --config.minimumReleaseAge=0. The runtime environment requires Node ^22.19.0 || >=24.0.0 (see package.json).
Typical Usage¶
Prerequisite: MiniMax Code is logged in on the local machine, and the credential file exists; DSH uses the desktop profile and the plugin is installed.
- Run the
dsh plugin ... addcommand mentioned above and restart DSH. - Open Settings → MiniMax, confirm the renewal status and credits; complete the daily check-in in the interface if needed.
- Enable the target model in the model list and save.
- Select the model corresponding to the MiniMax provider in DSH conversations or agent flows for inference.
For developer verification of renewal (does not modify the real token, only changes the expiration timestamp):
node test/renew-e2e.mjs ~/.minimax/auth/prod/cn/mcode-public/auth.json
This must be executed within the repository and when MiniMax Code is not running, according to the README instructions.
Configuration Items (Optional Overrides)¶
Some default values can be overridden via schemastery Config:
| Field | Default |
|---|---|
baseUrl |
https://agent.minimax.cn/mavis/api/v1/llm |
cloudBaseUrl |
https://agent.minimax.cn/minimax-cloud/api/v1 |
authFile |
~/.minimax/auth/prod/cn/mcode-public/auth.json |
configFile |
~/.minimax/config.yaml |
cacheMs |
15000 |
enabledModelIds, imageOverrides, and useMaximumContextWindow are written by the settings page; each *Route is consistent with the README route table.
Applicable Scenarios and Notes¶
Suitable for: Developers who have subscribed to MiniMax Code, wish to use the same credit account for Anthropic protocol inference in DSH, and want automatic renewal after closing the desktop client.
Notes:
- The plugin reads the local auth file and initiates OAuth with the current DSH process permissions; please review the GitHub Source Code and the MIT license before installation.
- It relies on MiniMax non-public interfaces; backend changes may require plugin updates; endpoints are concentrated in the comments at the top of
lib/index.js. - The community directory SkillHub Plugin Page has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem philosophy is “Everything is a plugin”. The facts in this article are derived from the project README and package.json.
Conclusion¶
dsh-minimax-connect transforms the local MiniMax Code login state into a DSH model provider, filling the gaps in token self-renewal, credit check-in, and model switching, while connecting directly to the official Anthropic Messages endpoint. To learn more, visit the community directory page and the repository:
- Directory: https://www.skillhub.cn/plugins/VICqiufeeng/dsh-minimax-connect
- GitHub: https://github.com/VICqiufeeng/dsh-minimax-connect