Sign In to MiniMax with OAuth
Hermes supports the global MiniMax service through the minimax-oauth provider. The flow uses browser OAuth with PKCE, stores the resulting session in the Hermes authentication store, and routes inference through MiniMax’s Anthropic Messages-compatible endpoint.
This OAuth route is not the same as the API-key-based minimax or minimax-cn providers. In particular, the documented China-region path uses minimax-cn with MINIMAX_CN_API_KEY; it does not use the global OAuth flow.
Login checklist
- Confirm the account belongs to the global MiniMax portal rather than the China platform.
- Run
hermes modeland select MiniMax (OAuth). - Approve the browser authorization request.
- Select a model from the current MiniMax OAuth picker.
- Run
hermes doctorand confirm the provider is logged in. - Start a fresh session and complete one small chat request.
- Test one harmless tool call before using the provider for agentic work.
- Protect the Hermes authentication store as a credential-bearing file.
hermes model
hermes auth add minimax-oauth
hermes doctor
hermesThe minimax-oauth provider does not read MINIMAX_API_KEY or MINIMAX_CN_API_KEY. Do not add those variables while troubleshooting the OAuth provider; they select different authentication paths.
Remote and headless login
When Hermes cannot open a local browser, use:
hermes auth add minimax-oauth --no-browserHermes prints a verification URL and user code. Open the URL on another device, complete approval before the code expires, and leave the CLI running while it polls for the token.
Token refresh and model choice
Hermes refreshes the OAuth session near expiry. A revoked or invalid refresh grant requires a new login; repeatedly starting sessions will not repair a terminal invalid_grant condition.
The official guide lists standard and high-speed MiniMax model variants and documents a large context window, but model names, limits, and account availability can change. Use the current model picker and provider response as the deployment record rather than copying a stale model table.
Common pitfalls
- Using the global OAuth provider for a China-platform account.
- Setting
MINIMAX_API_KEYand expectingminimax-oauthto consume it. - Closing the headless session before the device-code exchange completes.
- Reusing an expired verification code instead of starting a fresh flow.
- Treating an OAuth approval page as proof that inference and tool calls work.
- Publishing the user code, token store, or account details in support output.
- Repeatedly retrying a revoked refresh token instead of re-authenticating.
Verification steps
- Run
hermes doctorand confirm MiniMax OAuth reports a logged-in state and the intended region. - Inspect the active provider and ensure it is
minimax-oauth, not an API-key alias. - Send a short prompt and confirm streaming completes without an authentication error.
- Run a harmless tool-calling test to validate the Anthropic Messages-compatible adapter.
- Restart Hermes and make another request so saved credentials and refresh behavior are exercised.
- For unattended use, repeat the test in the actual gateway or service environment.
Official documentation
https://hermes-agent.nousresearch.com/docs/guides/minimax-oauth
