Skip to content

feat: add MiniMax as LLM provider for AI script generation - #115

Open
octo-patch wants to merge 1 commit into
6drf21e:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as LLM provider for AI script generation#115
octo-patch wants to merge 1 commit into
6drf21e:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

Copy link
Copy Markdown

Summary

  • Add MiniMax M2.7 and MiniMax-M2.5-highspeed as LLM provider options for the AI script generation feature in the role-play tab
  • MiniMax provides an OpenAI-compatible API at https://api.minimax.io/v1, making integration seamless with the existing openai SDK usage
  • Handle MiniMax-specific quirks: temperature default (0.7) and <think> tag stripping from responses

Changes

File Change
webui_mix.py Add MiniMax models to llm_change() URL mapping and Radio selector; add MiniMax platform link to free API channels
llm_utils.py Set temperature=0.7 for MiniMax models; strip <think> tags from MiniMax responses
README.md Add MiniMax to the list of supported LLM providers
tests/test_llm_minimax.py 22 unit tests covering URL mapping, temperature handling, think-tag stripping, JSON extraction
tests/test_minimax_integration.py 3 integration tests calling real MiniMax API (script generation, basic request, JSON output)

How to use

  1. Get a free API key from MiniMax Platform
  2. In the role-play tab, select MiniMax-M2.7 or MiniMax-M2.5-highspeed from the model selector
  3. Enter your MiniMax API key and click AI script generation

Test plan

  • 22 unit tests pass (pytest tests/test_llm_minimax.py)
  • 3 integration tests pass with real MiniMax API (pytest tests/test_minimax_integration.py -m integration)
  • Manual test: select MiniMax-M2.7 in the role-play tab and generate a script

Add MiniMax M2.7 and M2.5-highspeed models to the role-play script
generation feature, with temperature handling and thinking-tag stripping
for MiniMax responses.

- Add MiniMax-M2.7 and MiniMax-M2.5-highspeed to model selector
- Map MiniMax models to https://api.minimax.io/v1 base URL
- Set temperature=0.7 for MiniMax models in send_request
- Strip <think> tags from MiniMax model responses
- Add MiniMax platform link in the free API channels section
- Update README to list MiniMax in supported models
- Add 22 unit tests and 3 integration tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant