fix(provider): allow MiniMax users to override to /v1 endpoint#3553
Merged
fix(provider): allow MiniMax users to override to /v1 endpoint#3553
Conversation
… 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).
23 tasks
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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/v1URLs back to/anthropicand hardcodedanthropic_messagesmode. This prevented users from overriding viaMINIMAX_BASE_URLeven when they needed to.Changes
runtime_provider.py(lines 410-415)/anthropic→anthropic_messages, so the default path is unaffected/v1can now setMINIMAX_BASE_URL=https://api.minimax.chat/v1and getchat_completionsmode naturallyBehavior
/anthropic+anthropic_messagesMINIMAX_BASE_URL=.../v1/anthropic(broken)/v1+chat_completions✓MINIMAX_BASE_URL=.../anthropicanthropic_messagesCloses #3546 (different approach — respects user overrides instead of changing the default).