Skip to content

feat: add MiniMax as LLM and TTS provider#170

Open
octo-patch wants to merge 1 commit into
RayVentura:stablefrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as LLM and TTS provider#170
octo-patch wants to merge 1 commit into
RayVentura:stablefrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Add MiniMax as both an LLM and TTS provider for ShortGPT.

Changes

LLM Provider (Chat Model)

  • Add MiniMax as alternative LLM provider in gpt_utils.py via OpenAI-compatible API
  • Support MiniMax-M2.7 and MiniMax-M2.7-highspeed models (204K context window)
  • Priority order: Gemini > MiniMax > OpenAI (backwards compatible)
  • Temperature clamping for MiniMax API constraints (0.01-1.0)
  • Fix num_tokens_from_messages() to gracefully handle non-OpenAI models

TTS Provider (Text-to-Speech)

  • Add MiniMaxVoiceModule extending VoiceModule ABC
  • Support speech-2.8-hd model with 12 built-in voices
  • Integrate into all 3 UI tabs: Short Automation, Video Automation, Video Translation
  • Add MiniMax TTS as selectable TTS engine alongside ElevenLabs and EdgeTTS

Configuration

  • Add MINIMAX to ApiProvider enum
  • Add MINIMAX_API_KEY input field in Config tab UI

Tests

  • 24 unit tests (LLM provider selection, temperature clamping, TTS module, API requests)
  • 6 integration tests (LLM chat completion, streaming, TTS audio generation)

Files Changed (13 files, 656 additions)

API Documentation

- Add MiniMax LLM support via OpenAI-compatible API (MiniMax-M2.7, MiniMax-M2.7-highspeed)
- Add MiniMax TTS voice module (speech-2.8-hd) with 12 built-in voices
- Add MINIMAX_API_KEY to ApiProvider enum and config UI
- Add MiniMax TTS option in short automation, video automation, and translation tabs
- Add temperature clamping for MiniMax (0.01-1.0)
- Fix num_tokens_from_messages to handle non-OpenAI models gracefully
- Add 24 unit tests and 6 integration tests
@octo-patch octo-patch requested a review from RayVentura as a code owner March 20, 2026 13:59
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 20, 2026

Someone is attempting to deploy a commit to the rayventura's projects Team on Vercel.

A member of the Team first needs to authorize it.

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