Skip to content

fix(cli): follow 307 redirects in MiniMax OAuth httpx clients#19392

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-8c54fd4a
May 3, 2026
Merged

fix(cli): follow 307 redirects in MiniMax OAuth httpx clients#19392
teknium1 merged 1 commit into
mainfrom
hermes/hermes-8c54fd4a

Conversation

@teknium1

@teknium1 teknium1 commented May 3, 2026

Copy link
Copy Markdown
Contributor

Salvage of #19335 by @amitgaur onto current main.

Summary

The MiniMax OAuth endpoints moved from api.minimax.io to account.minimax.io and the old paths now respond with HTTP 307. httpx defaults to follow_redirects=False, so device-code and token-refresh flows were failing with Temporary Redirect. Enables redirect-following on both clients.

Changes

  • hermes_cli/auth.py: follow_redirects=True on the two MiniMax OAuth httpx clients (+4/-2)
  • scripts/release.py: AUTHOR_MAP entry for @amitgaur

Validation

scripts/run_tests.sh tests/hermes_cli/ -k minimax → 42 passed

Original PR: #19335

The MiniMax OAuth API endpoints have moved from api.minimax.io to
account.minimax.io and the old paths now respond with HTTP 307.
httpx defaults to follow_redirects=False (unlike requests), so the
device-code and token-refresh flows fail with "Temporary Redirect".

Adds follow_redirects=True to the two httpx.Client instances in
hermes_cli/auth.py used by the MiniMax OAuth flow. This is forward-
compatible -- if endpoints move again, the redirect chain is
followed automatically.

Repro before patch:
  curl -i -X POST https://api.minimax.io/oauth/code  # -> 307
  curl -i -X POST https://api.minimax.io/oauth/token # -> 307

Verified end-to-end against a real MiniMax Plus account on macOS;
the existing tests/test_minimax_oauth.py suite (15 tests) still
passes.
@teknium1 teknium1 merged commit 65bebb9 into main May 3, 2026
9 of 10 checks passed
@teknium1 teknium1 deleted the hermes/hermes-8c54fd4a branch May 3, 2026 22:26
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard provider/minimax MiniMax (Anthropic transport) area/auth Authentication, OAuth, credential pools labels May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists provider/minimax MiniMax (Anthropic transport) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants