[Feature]: M Plan — expose the plan tier and per-capability model coverage so clients can show only what the key can call
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 34/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 2.2k
- Fork
- 200
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MiniMax-AI/cli
-
[Bug] 未登录时 mmx help 被认证检查拦截,无法查看公开文档链接Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
MiniMax-AI/cli#259 · 1 bình luận ·
-
[Bug] --no-color 未去除请求状态栏的 ANSI 颜色Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
MiniMax-AI/cli#258 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 47/100
MiniMax-AI/cli#310 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
MiniMax-AI/cli#287 ·
-
[Bug] 输入框默认提示文字(placeholder)未被清除,与实际输入内容重叠显示Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 63/100
MiniMax-AI/cli#278 ·
Tất cả issue của MiniMax-AI/cli
Issue tương tự
-
area:api bug good first issue priority:high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Doezer/Questarr#1486 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Sergey-Bar/Penny#245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mihazs/lazysh#3377 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Approve the Cloudflare agent plugin for harness sessionsCó thể đã có người làm @joshtsch đã nhận hôm nay. Đang mởenhancement ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày