Skip to content

feat: add MiniMax OAuth device code flow + multi-region support#134

Open
jiemu-minimax wants to merge 17 commits into
MiniMax-AI:mainfrom
jiemu-minimax:feat/oauth
Open

feat: add MiniMax OAuth device code flow + multi-region support#134
jiemu-minimax wants to merge 17 commits into
MiniMax-AI:mainfrom
jiemu-minimax:feat/oauth

Conversation

@jiemu-minimax
Copy link
Copy Markdown

@jiemu-minimax jiemu-minimax commented May 12, 2026

Summary

  • Add OAuth device code flow login with PKCE (mmx auth login)
  • Multi-region support (global / CN) with interactive region selection on first login
  • Token refresh with retry logic and 5-minute proactive buffer
  • Propagate BEDROCK_LANE and X-User-Pre headers to all API and auth requests
  • Remove unused browser-based Authorization Code Flow (dead code)

Test plan

  • mmx auth login — interactive region selection on first login
  • OAuth device code flow completes successfully (global)
  • OAuth device code flow completes successfully (CN, --region cn)
  • Token refresh works when token expires
  • BEDROCK_LANE / X_USER_PRE env — verify headers in requests
  • mmx auth login --api-key — API key flow unaffected
  • Region saved to config, not re-asked on subsequent logins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant