feat: add MiniMax LLM provider support#142
Closed
itsarbit wants to merge 5 commits into
Closed
Conversation
- Add MiniMax LLM provider using OpenAI-compatible Chat Completions API - Support MiniMax-M2.5 and MiniMax-M2.5-highspeed models - Handle temperature constraint (0.0, 1.0] with automatic clamping - Implement structured output via prompt engineering + JSON parsing - Register provider in LLM factory with provider name "minimax" - Add unit tests for MiniMax provider - Update README with MiniMax provider documentation
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to UI model selector - Add minimax to providers list and env hints in frontend - Update test references from M2.5 to M2.7 - Keep all previous models as alternatives Co-Authored-By: Octopus <liyuan851277048@icloud.com>
…default
Address review feedback:
- Use response_format: {"type": "json_object"} for structured output instead
of relying solely on prompt engineering. MiniMax supports this via their
OpenAI-compatible API.
- Only include temperature in API calls when explicitly set by the user,
matching the behavior of the OpenAI and Anthropic providers. Remove the
hardcoded 1.0 default.
- Add null check for response content in both call() and call_async() to raise a clear ValueError instead of surfacing confusing downstream errors when MiniMax returns no content - Add logger.warning when temperature is clamped to (0.01, 1.0] range so users are aware their value was adjusted - Add tests for both changes (4 new test cases) Addresses review feedback from @itsarbit.
…rovider # Conflicts: # README.md
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Resolved merge conflicts from #96 (by @octo-patch) against current main.
Original PR: #96
Changes: MiniMax LLM provider, factory registration, UI dropdown, 26 tests.
Closes #96