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
Fixes the silent failure of hermes setup quick-wizard for MiniMax OAuth and the stale verification_uri that returns from MiniMax's /oauth/code.
What changed and why
hermes_cli/auth.py: Added _normalize_minimax_verification_uri() and apply it inside _minimax_request_user_code(). MiniMax currently returns https://www.minimax.io/oauth-authorize?... which 307-redirects to the marketing homepage and has no OAuth approval UI — the live approval page is at platform.minimax.io/oauth-authorize?.... Rewrite the host client-side until upstream is fixed. Bare paths and unrelated hosts are left untouched.
hermes_cli/main.py: Replaced the catch-all except SystemExit: print("Login cancelled or failed.") in _model_flow_minimax_oauth() with explicit KeyboardInterrupt / SystemExit / Exception branches. Each branch flushes stdout, logs a traceback at warning level for the generic case, and tells the user the provider was not configured and how to retry. This stops the wizard from appearing to silently advance after an OAuth error.
tests/test_minimax_oauth.py: Added 5 tests — _normalize_minimax_verification_uri happy/unrelated/end-to-end, plus three _model_flow_minimax_oauth tests covering the SystemExit, generic-Exception, and KeyboardInterrupt paths.
Manual: simulate a failing OAuth login (e.g. block api.minimax.io in /etc/hosts) and run hermes setup → "MiniMax via OAuth browser login". The wizard now prints MiniMax OAuth login failed: ... Provider not configured. Re-run 'hermes model' to retry. instead of advancing silently.
Verify the printed verification URL points at platform.minimax.io rather than www.minimax.io.
What platforms tested on
macOS on darwin-arm64 (local) — full pytest tests/hermes_cli tests/test_minimax_oauth.py run: 1359 passed, 1 skipped, 1 pre-existing systemd test failure unrelated to this change.
Rebased onto current origin/main to clear the merge conflict (PR was DIRTY). The only conflict was in tests/test_minimax_oauth.py — both upstream's newly added build_minimax_oauth_token_provider / generic-auth-dispatch tests and this PR's verification-uri normalization + setup-failure-surfacing tests were additive at the same location, so both sets were kept (no test lost, no duplicate names). Re-ran the in-scope suite: pytest tests/test_minimax_oauth.py -> 34 passed; ruff check clean. The previously-red test check's failures are all in files outside this PR's scope (gateway/teams/update/dockerfile/kanban tests) and appear to be pre-existing upstream issues unrelated to this change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
area/authAuthentication, OAuth, credential poolscomp/cliCLI entry point, hermes_cli/, setup wizardP3Low — cosmetic, nice to haveprovider/minimaxMiniMax (Anthropic transport)type/bugSomething isn't working
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the silent failure of
hermes setupquick-wizard for MiniMax OAuth and the staleverification_urithat returns from MiniMax's/oauth/code.What changed and why
hermes_cli/auth.py: Added_normalize_minimax_verification_uri()and apply it inside_minimax_request_user_code(). MiniMax currently returnshttps://www.minimax.io/oauth-authorize?...which 307-redirects to the marketing homepage and has no OAuth approval UI — the live approval page is atplatform.minimax.io/oauth-authorize?.... Rewrite the host client-side until upstream is fixed. Bare paths and unrelated hosts are left untouched.hermes_cli/main.py: Replaced the catch-allexcept SystemExit: print("Login cancelled or failed.")in_model_flow_minimax_oauth()with explicitKeyboardInterrupt/SystemExit/Exceptionbranches. Each branch flushes stdout, logs a traceback at warning level for the generic case, and tells the user the provider was not configured and how to retry. This stops the wizard from appearing to silently advance after an OAuth error.tests/test_minimax_oauth.py: Added 5 tests —_normalize_minimax_verification_urihappy/unrelated/end-to-end, plus three_model_flow_minimax_oauthtests covering the SystemExit, generic-Exception, and KeyboardInterrupt paths.How to test
pytest tests/test_minimax_oauth.py -q(21 passed).api.minimax.ioin/etc/hosts) and runhermes setup→ "MiniMax via OAuth browser login". The wizard now printsMiniMax OAuth login failed: ... Provider not configured. Re-run 'hermes model' to retry.instead of advancing silently.platform.minimax.iorather thanwww.minimax.io.What platforms tested on
pytest tests/hermes_cli tests/test_minimax_oauth.pyrun: 1359 passed, 1 skipped, 1 pre-existing systemd test failure unrelated to this change.Fixes #19336
Fixes #19337