[Bug]: MiniMax Code sign-in always opens the Mainland China login host (agent.minimaxi.com) with no Global region or API key option#17601

opened13d agobySsfourdrinier

Summary

The MiniMax Code provider sign-in in T3 Code always opens the Mainland China login host (agent.minimaxi.com). There is no way to select the Global region (agent.minimax.io), and no way to paste an API key instead of using OAuth.

For users with a global MiniMax account this makes the provider effectively unusable: the OAuth flow sends them to a regional platform where their account does not exist.

Steps to reproduce

  1. Open the Add provider dialog.
  2. Select the MiniMax Code provider and continue to the Sign in step.
  3. T3 Code opens a browser to the Mainland login host.

The URL printed in the terminal pane is:

1https://agent.minimaxi.com/login?sso=1&target=mcode-internal&callback_port=5007&callback_state=<redacted>&download_source=mcode-internal

The callback_state value is a per-session token and has been redacted. The shape of the URL is what matters for this report.

Expected behaviour

Either of the following would resolve this:

  1. A region selector in the sign-in step, defaulting to Global and falling back to an explicit choice for Mainland accounts.
  2. An API key option, so a user with a global key can paste it directly and skip the regional OAuth flow entirely.

MiniMax already exposes both in its own tooling, so there is prior art to follow.

The mcode CLI already has the exact flag

From the official MiniMax Agent docs:

The default region is mainland China; pass --region global for a Global account.

bash
1mcode login # mainland China account
2mcode login --region global # global account
3mcode acp login --region <region>

T3 Code's MiniMax Code provider is driving exactly this CLI (target=mcode-internal), and it is invoking the login step as if every account were a Mainland one.

The API key path is documented too

bash
1export MCODE_PROVIDER_API_KEY="your MiniMax API key"
2mcode provider set-minimax-key
3# optionally: --api-key-env <name> to read a different variable

The sibling mmx CLI has the same shape: mmx auth login --recommend --region=global|cn and mmx auth login --api-key sk-xxxxx.

Regional hosts

MiniMax runs two fully separate backends that do not share credentials or endpoints. A key from one region will not authenticate against the other's host.

RoleGlobalMainland China
Platformplatform.minimax.ioplatform.minimaxi.com
Agent / login hostagent.minimax.ioagent.minimaxi.com
Account / OAuth hostaccount.minimax.ioaccount.minimaxi.com
API hostapi.minimax.ioapi.minimaxi.com

Worth noting there are two distinct host families, not one. The agent.* hosts serve the mcode agent login and the coding-plan usage endpoint (GET /v1/api/openplatform/coding_plan/remains), while account.* hosts serve the OAuth device-code exchange (/oauth2/device/code). agent.minimax.io/login returns 200 and mirrors the endpoint T3 Code currently calls, so it is the closest drop-in for a global login. Because the region is a property of the stored credential rather than a global setting, whichever region the sign-in uses has to be consistent with the API host used afterwards.

Notes

  • Both hosts return HTTP 200, so this is not a broken link. It silently routes international users to the wrong regional login rather than surfacing an error, which is likely why it has gone unnoticed.
  • The URL parameters (download_source=mcode-internal, callback_port=5007) suggest the host is resolved through T3 Connect rather than hardcoded in the app. Grepping the shipped macOS bundle for agent.minimax*, account.minimax*, api.minimax* and platform.minimax* returns no matches, and a codebase search for agent.minimaxi returns nothing either. Flagging this in case it points at where the fix belongs.
  • Other providers in the dialog appear to support both OAuth and API key entry, which makes MiniMax Code the outlier here.

Environment

T3 Code0.0.46-nightly.20261009.2873
PlatformmacOS (Apple Silicon), T3 Code desktop
ProviderMiniMax Code (mcode-internal)
AccountGlobal region (minimax.io)

Reproduced in the Linux web dev app on cached main b5a226e49c, using isolated seeded state: Settings → Providers → Add provider → MiniMax Code v0.2.7 → Continue to sign-in → Sign in. The terminal prints an agent.minimaxi.com/login URL and waits for browser login; there is no region selector or API-key choice. Cancelled without completing login. The callback state is redacted in the capture.

No duplicate found among open issues in the last 90 days. Fetching main timed out, so a newer head and macOS desktop remain unverified. Leaving this open for maintainer handling because the fix changes provider authentication.

MiniMax Code sign-in opens the Mainland host; callback state redacted

Reproduced on current main 49e97d48f9 in the Linux web dev app with isolated seeded state: Settings → Providers → Add provider → MiniMax Code v0.2.7 → Continue to sign-in → Sign in. The terminal opens agent.minimaxi.com/login and waits for browser login; no Global region or API-key choice is offered. Cancelled without completing sign-in. No duplicate found among open issues; the existing MiniMax prompt-retry PR concerns a different failure.

MiniMax Code login on current main; callback state redacted