Skip to content

feat(minimax): add LLM provider support#5170

Open
octo-patch wants to merge 2 commits intolivekit:mainfrom
octo-patch:feature/add-minimax-llm-provider
Open

feat(minimax): add LLM provider support#5170
octo-patch wants to merge 2 commits intolivekit:mainfrom
octo-patch:feature/add-minimax-llm-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Add LLM provider support to the existing MiniMax plugin, which currently only supports TTS.

The MiniMax LLM API is OpenAI-compatible, so the implementation follows the same pattern used by the Groq plugin — extending OpenAILLM with MiniMax-specific defaults (base URL, API key, models).

Changes

  • llm.py: New LLM class extending OpenAILLM with MiniMax base URL (https://api.minimax.io/v1) and MINIMAX_API_KEY env var support
  • __init__.py: Export the new LLM class alongside existing TTS
  • pyproject.toml: Add openai extra dependency (required by OpenAILLM base class), fix description
  • README.md: Add LLM usage documentation
  • tests/test_minimax_llm.py: 9 unit tests + 3 integration tests

Supported Models

  • MiniMax-M2.7 (default, latest)
  • MiniMax-M2.5
  • MiniMax-M2.5-highspeed (204K context)

Usage

from livekit.plugins import minimax

llm = minimax.LLM(model="MiniMax-M2.7")

Test plan

  • All 9 unit tests pass (API key validation, model selection, exports)
  • All 3 integration tests pass with real MiniMax API (simple chat, temperature, M2.7 model)
  • Ruff lint and format checks pass
  • No changes to existing code — only additive changes to the MiniMax plugin

The existing MiniMax plugin only supports TTS. This adds LLM support
by extending the OpenAI-compatible LLM base class, following the same
pattern used by the Groq plugin.

Supported models: MiniMax-M2.7, MiniMax-M2.5, MiniMax-M2.5-highspeed

Changes:
- Add llm.py with LLM class extending OpenAILLM
- Update __init__.py to export LLM
- Update pyproject.toml to add openai dependency
- Update README.md with LLM usage docs
- Add 9 unit tests and 3 integration tests

Co-Authored-By: octopus <noreply@github.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 20, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@tinalenguyen
Copy link
Copy Markdown
Member

tinalenguyen commented Mar 20, 2026

Hi, thanks for the PR! Could you sign the CLA?

@octo-patch
Copy link
Copy Markdown
Author

@tinalenguyen thanks, already signed 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.

4 participants