[Feature]: M Plan — expose the plan tier and per-capability model coverage so clients can show only what the key can call
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 34/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with the M Plan quota response from GET /v1/token_plan/remains and compare it with the Token Plan behavior described in #173 and #205. The issue asks for API changes spanning quota, model discovery, and media error responses, but leaves the response design open. First establish which API surface this repository can change; done means clients can identify the key's plan coverage and distinguish an uncovered model from quota exhaustion.
索引モデルが issue の本文から書いたものです。
説明
Summary
GET /v1/token_plan/remains reports quota for M Plan subscriptions, but it does not report
which plan the key is on or which models that plan covers. M Plan has three tiers with
different model coverage (Go / Explore / Build — https://platform.minimax.io/docs/m-plan/intro),
and that distinction is invisible to any API client. The only place the plan appears anywhere in
the API is inside a rejected request's error text.
This was solvable with the previous Token Plan: the quota response carried one bucket per
capability, and a model your plan did not bundle came back with current_interval_total_count: 0
and current_*_status: 3, which clients rendered as "not in plan" (see #173 and the fix in #205).
M Plan replaced those per-capability buckets with a single general bucket that carries
percentages only, so the "not in plan" signal no longer exists in the response.
The practical consequence: a client cannot know that MiniMax-H3 (video) and
MiniMax-H3-Image-Highspeed are not included on the Go tier, so it lists them, the user picks
one, and the request is rejected with usage limit exceeded ... (0/0 used) — which reads like a
broken quota counter rather than "this model is not in your plan".
What we observe today
With an M Plan key (sk-cp-…):
$ curl -s https://api.minimax.io/v1/token_plan/remains -H "Authorization: Bearer $MINIMAX_API_KEY"
{
"model_remains": [
{
"model_name": "general",
"current_interval_total_count": ...,
"current_interval_usage_count": ...,
"current_interval_remaining_percent": 99,
"current_weekly_total_count": ...,
"current_weekly_usage_count": ...,
"current_weekly_remaining_percent": 56,
"current_interval_status": 1,
"current_weekly_status": 1,
...
}
]
}
One bucket named general. Percentages only. No tier, no per-capability buckets, no indication of
which models are callable. (current_*_status is 1 — the "normal" value — so it cannot be used
to distinguish "included" from "not included" the way it could under Token Plan.)
$ curl -s https://api.minimax.io/v1/models -H "Authorization: Bearer $MINIMAX_API_KEY"
returns the platform's text catalogue — 9 models. It is not account-aware: it lists
MiniMax-M2, MiniMax-M2.1, MiniMax-M2.5, MiniMax-M2.7 (not included in M Plan) and omits
MiniMax-H3-Image and MiniMax-H3 (both included). It is therefore actively misleading for a
plan key, and it is not the list of models the key can call.
The media endpoints do not report plan membership either. They report the endpoint's static model
list:
$ curl -s -X POST https://api.minimax.io/v1/images/generations \
-H "Authorization: Bearer $MINIMAX_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"image-01","prompt":"a red cube","n":1}'
{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "invalid params, unknown model \"image-01\", must be one of MiniMax-H3-Image, MiniMax-H3-Image-Highspeed (2013)",
"http_code": "400"
}
}
The "must be one of …" list is the endpoint's static list, not the key's plan. For a Go subscriber
it is wrong, and "unknown model" is the wrong diagnosis — the model is known, it is just not in
their plan.
The rejection path is the only place the plan is named at all:
HTTP 200
{"base_resp":{"status_code":2056,
"status_msg":"usage limit exceeded, weekly usage limit reached for Token Plan Plus (0/0 used)"}}
Note that MiniMax answers HTTP 200 with base_resp.status_code set, so clients have to parse
the body to see the failure.
Why this matters
- Third-party clients cannot hide what they cannot call. OpenCode already implements this for
the ChatGPT and GitHub Copilot subscriptions — it fetches the account's model list up front and
shows exactly that. The same approach for M Plan would need an endpoint that returns the plan's
model list. This is the same gap as https://github.com/MiniMax-AI/MiniMax-M2/issues/60, but the
blocker there was the existence of/v1/models; here the blocker is that the list is not
plan-scoped. - The error message is misleading.
usage limit exceeded ... (0/0 used)reads as a quota
problem. For a model that is not in the subscriber's tier it is an entitlement problem, and the
two need different remedies (wait vs. upgrade). - Quota UIs cannot show what is left.
mmx quota showcan only render the buckets the API
returns, so on M Plan it shows a singlegeneralrow. See also #92 and #176.
What we are asking for
In priority order — the first one is the one we would use immediately, the others follow from it.
-
Report the plan tier in the quota response. For example an added field on the
model_remainsentry, or a sibling field on the response:{ "plan": "explore", "plan_tier": "explore", "model_name": "general", ... }With the tier, a client can map it to the published coverage table
(https://platform.minimax.io/docs/m-plan/intro) and offer exactly the right models. -
Restore a per-capability signal in the quota response. Even if it is only the two buckets
that exist today, avideobucket that is absent (or flagged) would tell a client that video
generation is not covered, without needing the tier name. Restoring the Token Plan shape —
one entry per capability, withavailable: false/statusfor models the plan does not
bundle — would also let the CLI's existing "not in plan" rendering work unchanged (see #173,
#205). -
Make
GET /v1/modelsaccount-aware, or add a plan-scoped variant. Either
GET /v1/modelsreturns the models the key can call, orGET /v1/models?plan=1does. Today
the response is the platform catalogue and is misleading for plan keys. -
Distinguish "unknown model" from "not in your plan" in the media endpoints, and make the
allowed-model list plan-scoped when the caller is on a plan. A client that gets
not included in your plancan act on it; a client that getsunknown modelcannot.
What we can do on the client side meanwhile
We are happy to contribute the client-side half in this repository:
- map
status_code 2056to a clear "this model is not included in your plan — upgrade at
" message, instead of surfacing the rawusage limit exceeded ... (0/0 used)text
(there is currently no handling for2056insrc/errors/api.ts); - refresh the plan hints in
src/errors/api.ts, which still describe the previous plan
("image-01 requires the Plus plan or above", "Video models (Hailuo-2.3 / 2.3-Fast) require the
Max plan or above") and link to/subscribe/token-plan, whereas M Plan lives at
https://www.minimax.io/m-plan with tiers Go / Explore / Build and the models
MiniMax-H3-Image,MiniMax-H3-Image-Highspeed,MiniMax-H3; - a preflight check in
mmx video generate/mmx image generatethat fails fast with
"not included in your plan" when the quota response says so (this was suggested as a bonus in
#173 and never implemented).
Say the word and we will open a PR for that part.
Related issues
- #173 — quota endpoint and generation endpoint contradict each other (the Token Plan version of
this problem; fixed for Token Plan by #205, but the per-capability signal M Plan needs does not
exist there) - #176 — expose the quota/usage API to third parties
- #249 — return decimals in the quota percentages
- #92 —
mmx quota showdiffers from the dashboard - https://github.com/MiniMax-AI/MiniMax-M2/issues/60 — no
/v1/modelsendpoint - https://github.com/MiniMax-AI/MiniMax-M2.7/issues/47 and #48 — quota shape problems on M Plan
- https://github.com/MiniMax-AI/MiniMax-MCP/issues/80 — 2056 for plan subscribers when a model is
not covered
Reproduction
KEY=sk-cp-...
curl -s https://api.minimax.io/v1/token_plan/remains \
-H "Authorization: Bearer $KEY" | jq
curl -s https://api.minimax.io/v1/models \
-H "Authorization: Bearer $KEY" | jq '.data[].id'
curl -s -X POST https://api.minimax.io/v1/images/generations \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"model":"image-01","prompt":"a red cube","n":1}' | jq
- 主要言語
- TypeScript
- スター
- 2.2k
- フォーク
- 200
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MiniMax-AI/cli のほかの issue
-
[Bug] 未登录时 mmx help 被认证检查拦截,无法查看公开文档链接再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
MiniMax-AI/cli#259 · コメント 1 件 ·
-
[Bug] --no-color 未去除请求状态栏的 ANSI 颜色再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
MiniMax-AI/cli#258 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 47/100
MiniMax-AI/cli#310 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
MiniMax-AI/cli#287 ·
-
[Bug] 输入框默认提示文字(placeholder)未被清除,与实际输入内容重叠显示対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 63/100
MiniMax-AI/cli#278 ·
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
tashfeenahmed/freellmapi#2217 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
remotion-dev/skills#37 ·
-
gui: a narrow window's gateway key row with a line under it wraps its faded badges onto blank linesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
Slider: Escape during a thumb drag keeps and commits the dragged value, unlike ui-sdk's other dragsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vercel-labs/ui#1758 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nicobailon/pi-subagents#3425 ·
メンテナーはふだん 1 日以内に返信