[Feature]: M Plan — expose the plan tier and per-capability model coverage so clients can show only what the key can call
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 34/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript
- Domaine
- api, backend-api-design
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- TypeScript
- Étoiles
- 2.2k
- Forks
- 200
- Merge moyen
- 1 j 5 h
- PR mergées (30 j)
- 3
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de MiniMax-AI/cli
-
[Bug] 未登录时 mmx help 被认证检查拦截,无法查看公开文档链接Peut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
MiniMax-AI/cli#259 · 1 commentaire ·
-
[Bug] --no-color 未去除请求状态栏的 ANSI 颜色Peut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
MiniMax-AI/cli#258 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 47/100
MiniMax-AI/cli#310 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 15/100
MiniMax-AI/cli#287 ·
-
[Bug] 输入框默认提示文字(placeholder)未被清除,与实际输入内容重叠显示Peut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 63/100
MiniMax-AI/cli#278 ·
Toutes les issues de MiniMax-AI/cli
Issues similaires
-
area:api bug good first issue priority:high
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Doezer/Questarr#1486 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Sergey-Bar/Penny#245 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
mihazs/lazysh#3377 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Approve the Cloudflare agent plugin for harness sessionsPeut-être pris @joshtsch l’a pris aujourd’hui. Ouverteenhancement ready-for-agent
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour