feat: add MiniMax model compatibility support#162
Open
octo-patch wants to merge 1 commit into666ghj:mainfrom
Open
feat: add MiniMax model compatibility support#162octo-patch wants to merge 1 commit into666ghj:mainfrom
octo-patch wants to merge 1 commit into666ghj:mainfrom
Conversation
- Add MiniMax model detection and compatibility handling in LLMClient - Handle response_format incompatibility: MiniMax does not support response_format parameter, use prompt engineering for JSON output - Add temperature clamping for MiniMax (must be > 0) - Add robust JSON parsing from LLM responses (parse_json_from_response) - Update simulation_config_generator and oasis_profile_generator for MiniMax compatibility - Add MiniMax configuration examples in .env.example - Add MiniMax documentation in README.md and README-EN.md - Add unit tests for MiniMax compatibility functions Supported models: MiniMax-M2.5, MiniMax-M2.5-highspeed API docs: https://platform.minimax.io/docs/api-reference/text-openai-api
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
temperatureto0.01when set to0(MiniMax requirestemperature ∈ (0.0, 1.0]), and replace unsupportedresponse_formatwith prompt-based JSON instruction injection<think>tags from MiniMax M2.5 model responses insimulation_config_generator.pyandoasis_profile_generator.py.env.exampleand documentation toREADME.md/README-EN.mdChanges
backend/app/utils/llm_client.py_is_minimax(),_clamp_temperature(),_inject_json_instruction()helpers; updateLLMClient.chat()to conditionally skipresponse_formatfor MiniMaxbackend/app/services/simulation_config_generator.py<think>tag stripping in_call_llm_with_retry()backend/app/services/oasis_profile_generator.py<think>tag stripping in profile generation.env.exampleREADME.mdREADME-EN.mdbackend/tests/test_minimax_compat.pyTest plan
pytest backend/tests/test_minimax_compat.py)MiniMax Configuration
Supported models:
MiniMax-M2.5(flagship, 204K context) andMiniMax-M2.5-highspeed(faster variant).🤖 Generated with Claude Code