sub2api icon indicating copy to clipboard operation
sub2api copied to clipboard

fix: MiniMax mainland Coding Plan on api.minimax.cn is not recognized for usage queries

Open turingcat opened this issue 1 month ago • 0 comments

Version

v0.2.14. The same provider detection and quota URL logic is still present on upstream main at the time of reporting.

Reproduction

  1. Add a MiniMax API-key account with account mode coding and a mainland China subscription key.
  2. Configure the official mainland API host api.minimax.cn (e.g. https://api.minimax.cn/v1 or https://api.minimax.cn/anthropic, according to the selected protocol).
  3. Run a model test: inference succeeds.
  4. 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 to https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains, regardless of a configured api.minimax.cn inference URL. The current official Token Plan FAQ documents https://www.minimax.cn/v1/token_plan/remains with 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 /v1 account URLs do not match the mainland registry's /anthropic/v1 URL, 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.

turingcat avatar Oct 09 '26 00:10 turingcat