Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ OpenUsage lives in your menu bar and shows you how much of your AI coding subscr
- [**Gemini**](docs/providers/gemini.md) / pro, flash, workspace/free/paid tier
- [**JetBrains AI Assistant**](docs/providers/jetbrains-ai-assistant.md) / quota, remaining
- [**Kimi Code**](docs/providers/kimi.md) / session, weekly
- [**MiniMax**](docs/providers/minimax.md) / coding plan session
- [**MiniMax**](docs/providers/minimax.md) / coding plan session model-calls, CN TTS/image buckets
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provider summary text reads a bit ambiguously (“coding plan session model-calls…”). Consider adding punctuation (e.g., a comma after “session”) so the list of metrics matches the style of the other provider entries and is easier to scan.

Suggested change
- [**MiniMax**](docs/providers/minimax.md) / coding plan session model-calls, CN TTS/image buckets
- [**MiniMax**](docs/providers/minimax.md) / coding plan session, model-calls, CN TTS/image buckets

Copilot uses AI. Check for mistakes.
- [**OpenCode Go**](docs/providers/opencode-go.md) / 5h, weekly, monthly spend limits
- [**Windsurf**](docs/providers/windsurf.md) / prompt credits, flex credits
- [**Z.ai**](docs/providers/zai.md) / session, weekly, web searches
Expand Down
40 changes: 33 additions & 7 deletions docs/providers/minimax.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- **Endpoint:** `GET https://api.minimax.io/v1/api/openplatform/coding_plan/remains`
- **Auth:** `Authorization: Bearer <api_key>`
- **Window model:** dynamic rolling 5-hour limit (per MiniMax Coding Plan docs)
- **Display note:** OpenUsage shows the raw text-session counts from the remains API as `model-calls`, because that matches the observed official usage display.
- **CN note:** current CN docs use `https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains`.

## Authentication

Expand Down Expand Up @@ -44,6 +46,7 @@ Fallbacks:

When the selected region is `CN`, requests use:

- `https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains`
- `https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains`
- `https://api.minimaxi.com/v1/coding_plan/remains`

Expand All @@ -61,25 +64,48 @@ Expected payload fields:

## Usage Mapping

- Treat `current_interval_usage_count` as remaining prompts (MiniMax remains API behavior).
- Treat `current_interval_usage_count` as the remaining raw session/resource count returned by the remains API.
- For the main text `Session` line, OpenUsage displays the raw remains numbers as `model-calls` rather than converting them to `prompts`.
- If only remaining aliases are provided, compute `used = total - remaining`.
- If explicit used-count fields are provided, prefer them.
- Plan name is taken from explicit plan/title fields when available.
- If plan fields are missing in GLOBAL mode, infer plan tier from known limits (`100/300/1000/2000` prompts or `1500/4500/15000/30000` model-call equivalents).
- If plan fields are missing in CN mode, infer only exact known CN limits (`600/1500/4500` model-call counts).
- Plan name is taken from explicit plan/title fields when available, and normalized to a shared six-plan naming scheme:
- `Starter`
- `Plus`
- `Max`
- `Plus-High-Speed`
- `Max-High-Speed`
- `Ultra-High-Speed`
- If plan fields are missing, infer the plan tier from the current Token Plan quota table for the selected region:
- `GLOBAL` raw `model-calls`: `1500 => Starter`, `4500 => Plus`, `15000 => Max`, `30000 => Ultra-High-Speed`
- `CN` raw `model-calls`: `600 => Starter`, `1500 => Plus`, `4500 => Max`, `30000 => Ultra-High-Speed`
- For overlapping middle tiers, the plugin also inspects companion daily quotas when present to disambiguate `Standard` vs `High-Speed`:
- `GLOBAL 4500`: `image-01 50` or `Speech 2.8 4000` => `Plus`; `image-01 100` or `Speech 2.8 9000` => `Plus-High-Speed`
- `GLOBAL 15000`: `image-01 120` or `Speech 2.8 11000` => `Max`; `image-01 200` or `Speech 2.8 19000` => `Max-High-Speed`
- `CN 1500`: `image-01 50` or `speech-hd 4000` => `Plus`; `image-01 100` or `speech-hd 9000` => `Plus-High-Speed`
- `CN 4500`: `image-01 120` or `speech-hd 11000` => `Max`; `image-01 200` or `speech-hd 19000` => `Max-High-Speed`
- If those companion quotas are absent or conflicting, the plugin falls back to the coarse family label (`Plus` / `Max`) instead of guessing.
- Additional `model_remains[]` companion resource buckets are rendered as separate daily detail lines in both `GLOBAL` and `CN` mode, for example `speech-hd` (`Text to Speech HD`) or `image-01`.
- Use `end_time` for reset timestamp when present.
- Fallback to `remains_time` when `end_time` is absent.
- Use `start_time` + `end_time` as `periodDurationMs` when both are valid.
- Non-session companion resource lines use a daily window when only `remains_time` is present.
- Prompt-based marketing copy is ignored by the plugin; all inference is based on raw remains quotas and companion resource buckets.
- Official package tables used for this split, checked on 2026-03-23:
- Global: <https://platform.minimax.io/docs/token-plan/intro>
- CN: <https://platform.minimaxi.com/docs/token-plan/intro>

## Output

- **Plan**: best-effort from API payload (normalized to concise label, with ` (CN)` or ` (GLOBAL)` suffix)
- **Session** (overview progress line):
- `label`: `Session`
- `format`: count (`prompts`)
- `used`: computed used prompts
- `limit`: total prompt limit for current window
- `format`: count (`model-calls`)
- `used`: computed used model-call count from raw remains data
- `limit`: raw session limit from the remains payload
- `resetsAt`: derived from `end_time` or `remains_time`
- **Extra resources** (detail progress lines when present in either region):
- `Text to Speech HD` / `Text to Speech Turbo`: count (`chars`)
- `Image Generation` / `image-01`: count (`images`)

## Errors

Expand Down
Loading
Loading