Skip to content

fix(provider): allow MiniMax users to override to /v1 endpoint#3553

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-135af169
Mar 28, 2026
Merged

fix(provider): allow MiniMax users to override to /v1 endpoint#3553
teknium1 merged 1 commit intomainfrom
hermes/hermes-135af169

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Summary

Users in certain regions get nginx 404 on api.minimax.io/anthropic (confirmed by Talion and wenzani in Discord). The endpoint works from our server but appears to have geographic routing gaps.

The previous fix (6bcec1ac) added minimax-specific auto-correction that forced /v1 URLs back to /anthropic and hardcoded anthropic_messages mode. This prevented users from overriding via MINIMAX_BASE_URL even when they needed to.

Changes

  • Removed the minimax-specific auto-correction in runtime_provider.py (lines 410-415)
  • The generic URL-suffix detection at line 408 already handles /anthropicanthropic_messages, so the default path is unaffected
  • Users who need /v1 can now set MINIMAX_BASE_URL=https://api.minimax.chat/v1 and get chat_completions mode naturally
  • Updated tests to verify both paths work

Behavior

Scenario Before After
Default (no override) /anthropic + anthropic_messages Same ✓
User sets MINIMAX_BASE_URL=.../v1 Auto-corrected to /anthropic (broken) /v1 + chat_completions
User sets MINIMAX_BASE_URL=.../anthropic anthropic_messages Same ✓

Closes #3546 (different approach — respects user overrides instead of changing the default).

… user override

The minimax-specific auto-correction in runtime_provider.py was
preventing users from overriding to the OpenAI-compatible endpoint
via MINIMAX_BASE_URL. Users in certain regions get nginx 404 on
api.minimax.io/anthropic and need to switch to api.minimax.chat/v1.

The generic URL-suffix detection already handles /anthropic →
anthropic_messages, so the minimax-specific code was redundant for
the default path and harmful for the override path.

Now: default /anthropic URL works via generic detection, user
override to /v1 gets chat_completions mode naturally.

Closes #3546 (different approach — respects user overrides instead
of changing the default endpoint).
@github-actions
Copy link
Copy Markdown

⚠️ Supply Chain Risk Detected

This PR contains patterns commonly associated with supply chain attacks. This does not mean the PR is malicious — but these patterns require careful human review before merging.

⚠️ WARNING: Install hook files modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py

Automated scan triggered by supply-chain-audit. If this is a false positive, a maintainer can approve after manual review.

@teknium1 teknium1 merged commit df6ce84 into main Mar 28, 2026
4 checks passed
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