Skip to content

[Upstream PR #188] fix: Update MiniMax API endpoint to China version (api.minimaxi.com) #141

@quangdang46

Description

@quangdang46

Mirrored from upstream 1jehuang/jcodePull Request #188 by @richardiitse
Original state: open
Created: 2026-05-11T06:00:37Z · Updated: 2026-05-11T06:54:31Z
Diff: https://github.com/1jehuang/jcode/pull/188.diff
This issue is an auto-mirrored copy. Comments and edits here are local to quangdang46/jcode — do not expect them to propagate upstream.


Summary

  • Changed MiniMax api_base from https://api.minimax.io/v1 (international) to https://api.minimaxi.com/v1 (China)
  • Updated setup_url to point to China platform documentation
  • Fixed related test assertions and OAUTH.md documentation

Problem

MiniMax operates two separate platforms:

  • International: api.minimax.io — uses standard API keys
  • China: api.minimaxi.com — uses Token Plan API Keys (sk-cp-... prefix)

The current code points to the international endpoint, causing 401 Unauthorized errors when users try to use China Token Plan API Keys.

Evidence

Error response when using wrong endpoint:

{
  "type": "error",
  "error": {
    "type": "authorized_error",
    "message": "login fail: Please carry the API secret key in the 'Authorization' field of the request header (1004)",
    "http_code": "401"
  }
}

Official documentation confirms China endpoint: https://platform.minimaxi.com/docs/llms.txt

Files Changed

  • crates/jcode-provider-metadata/src/lib.rs — Core profile constant
  • src/provider_catalog_tests.rs — Integration test
  • OAUTH.md — Provider documentation

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions