dsh-multi-key-rotation

Give a MiniMax Token Plan route several named API keys and let the plugin rotate between them by remaining quota: a spent plan, a rate limit or an auth error moves the route to the next key of the pool and retries the request. The next key is picked by reset order, so the window that rolls over soonest is spent first. Each key's remaining share is shown for both quota windows - the 5-hour one and the weekly one - next to its reset countdown, and a capsule in front of the model selector shows the two windows of the key in use. Supports the minimax and minimax-cn routes only.

Overview

Give a MiniMax Token Plan route several named API keys and let the plugin rotate between them by remaining quota: a spent plan, a rate limit or an auth error moves the route to the next key of the pool and retries the request. The next key is picked by reset order, so the window that rolls over soonest is spent first. Each key's remaining share is shown for both quota windows - the 5-hour one and the weekly one - next to its reset countdown, and a capsule in front of the model selector shows the two windows of the key in use. Supports the minimax and minimax-cn routes only.

Installation

Install from npm

dsh plugin --profile web add @danneleung/dsh-multi-key-rotation

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:DanneLeung/dsh-multi-key-rotation

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.