sub2api
sub2api copied to clipboard
fix: MiniMax mainland Coding Plan on api.minimax.cn is not recognized for usage queries
Version
v0.2.14. The same provider detection and quota URL logic is still present on upstream main at the time of reporting.
Reproduction
- Add a MiniMax API-key account with account mode
codingand a mainland China subscription key. - Configure the official mainland API host
api.minimax.cn(e.g.https://api.minimax.cn/v1orhttps://api.minimax.cn/anthropic, according to the selected protocol). - Run a model test: inference succeeds.
- Query the account's Coding Plan usage.
Actual result
The UI displays:
account is not a kimi/zhipu/minimax coding plan or opencode go account
This error occurs locally before a quota request is sent. Account.GetCodingPlanProvider() recognizes minimax.io, minimaxi.com, and minimax.com, but not minimax.cn.
Related compatibility gaps
minimaxQuotaURL()still routes mainland accounts tohttps://api.minimaxi.com/v1/api/openplatform/coding_plan/remains, regardless of a configuredapi.minimax.cninference URL. The current official Token Plan FAQ documentshttps://www.minimax.cn/v1/token_plan/remainswith Bearer subscription-key authentication. Its response compatibility needs verification.GetOpenAIFormatBaseURL()returns the old default mainland host for MiniMax accounts using the Anthropic protocol, rather than preserving the configured region.- Capability metadata enrichment matches models.dev providers by API URL. OpenAI-compatible
/v1account URLs do not match the mainland registry's/anthropic/v1URL, and there is no official MiniMax host fallback. This is a code-level finding; the precise production metadata-sync response has not been captured.
Expected result
Recognize official mainland MiniMax Coding Plan accounts, preserve their region during model discovery, query a supported regional quota endpoint, and enrich model capabilities independently of the official API protocol path. Untrusted lookalike/custom hosts must not be classified as official providers.
References
- https://platform.minimax.cn/docs/token-plan/faq
- https://platform.minimax.cn/docs/token-plan/other-tools
- https://github.com/anomalyco/models.dev/blob/dev/providers/minimax-cn/provider.toml
No API keys or account-identifying data are included in this report.