feat: add MiniMax provider support for prompt rewriting#11
Open
octo-patch wants to merge 1 commit intojd-opensource:mainfrom
Open
feat: add MiniMax provider support for prompt rewriting#11octo-patch wants to merge 1 commit intojd-opensource:mainfrom
octo-patch wants to merge 1 commit intojd-opensource:mainfrom
Conversation
- Auto-configure MINIMAX_API_KEY and base URL (https://api.minimax.io/v1) when a MiniMax model is selected via --rewrite-model - Fix temperature for MiniMax models (must be in (0.0, 1.0], not 0.0) - Add MINIMAX_API_KEY environment variable support - Add unit tests and integration tests for MiniMax provider
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
This PR adds MiniMax as a supported provider for the prompt rewriting feature in JoyAI-Image.
Changes
src/infer_runtime/settings.py: Auto-detects MiniMax models (any model whose name starts withminimax, case-insensitive) and configuresMINIMAX_API_KEYand the MiniMax OpenAI-compatible base URL (https://api.minimax.io/v1) automatically.src/infer_runtime/prompt_rewrite.py: Fixes temperature handling for MiniMax — MiniMax requirestemperaturein(0.0, 1.0]and rejects0.0, so MiniMax models now default to1.0.inference.py: Updated--rewrite-modelhelp text to document MiniMax support.tests/test_minimax_support.py: Unit tests (20) + integration tests (2, skipped withoutMINIMAX_API_KEY).Usage
When
--rewrite-modelis set to a MiniMax model (e.g.MiniMax-M2.7orMiniMax-M2.7-highspeed), the settings layer automatically:MINIMAX_API_KEYfrom the environmenthttps://api.minimax.io/v1(unlessOPENAI_BASE_URLis already set)Supported Models
MiniMax-M2.7MiniMax-M2.7-highspeedAPI Reference