fix: align MiniMax provider with official API docs#7126
Merged
Conversation
Aligns MiniMax provider with official API documentation. Fixes 6 bugs: transport mismatch (openai_chat -> anthropic_messages), credential leak in switch_model(), prompt caching sent to non-Anthropic endpoints, dot-to-hyphen model name corruption, trajectory compressor URL routing, and stale doctor health check. Also corrects context window (204,800), thinking support (manual mode), max output (131,072), and model catalog (M2 family only on /anthropic). Source: https://platform.minimax.io/docs/api-reference/text-anthropic-api Co-authored-by: kshitijk4poor <kshitijk4poor@users.noreply.github.com>
Contributor
|
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
Salvage of PR #7096 by @kshitijk4poor. Cherry-picked onto current main with contributor authorship preserved.
Aligns MiniMax provider with official API documentation (source). Fixes 6 bugs:
providers.pyhadopenai_chatfor minimax, should beanthropic_messagesswitch_model()— fell back toresolve_anthropic_token()for allanthropic_messagesproviders, sending Anthropic creds to MiniMaxis_native_anthropicwas set fromapi_modealone, now requiresprovider == "anthropic"MiniMax-M2.7→MiniMax-M2-7(model-not-found). Added minimax to preserve-dots set/anthropicURL → OpenAI SDK appended/chat/completions(404). Now uses_to_openai_base_url()NoneURL. Now uses/v1/modelsAlso corrects:
Salvage notes
test_setup_model_selection.pychange (file was deleted from main in dead code cleanup)Closes #7096