You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mirrored from upstream 1jehuang/jcode — Pull 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"
}
}
Summary
api_basefromhttps://api.minimax.io/v1(international) tohttps://api.minimaxi.com/v1(China)setup_urlto point to China platform documentationProblem
MiniMax operates two separate platforms:
api.minimax.io— uses standard API keysapi.minimaxi.com— uses Token Plan API Keys (sk-cp-...prefix)The current code points to the international endpoint, causing
401 Unauthorizederrors 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 constantsrc/provider_catalog_tests.rs— Integration testOAUTH.md— Provider documentationNeed help on this PR? Tag
@codesmithwith what you need.