Skip to content

feat(fastapi): add MiniMax LLM provider#34

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

feat(fastapi): add MiniMax LLM provider#34
octo-patch wants to merge 1 commit into
akdeb:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

Copy link
Copy Markdown

Summary

Adds MiniMax as a new LLM provider for the server/fastapi classic STT → LLM → TTS voice pipeline.

MiniMax exposes an OpenAI-compatible chat-completions API, so the provider reuses Pipecat's OpenAILLMService pointed at the MiniMax base URL (https://api.minimax.io/v1). This is the same pattern Pipecat itself uses to wire other OpenAI-compatible vendors (Grok, Groq, DeepSeek), so it fits the existing provider architecture cleanly and needs no new dependencies.

Changes

  • Add models/llm/minimax.py — thin provider module, default model MiniMax-M3
  • Register "minimax" in the LLM provider catalog in models/providers.py (requires MINIMAX_API_KEY); it now shows up in the /providers endpoint and is validated at startup like the other providers
  • Document MINIMAX_API_KEY (and the optional MINIMAX_BASE_URL override for the mainland-China endpoint) in env.example
  • Update the FastAPI README.md (provider list, required keys, module list, example stack)

Usage

CLASSIC_LLM_PROVIDER=minimax
MINIMAX_API_KEY=your_minimax_api_key

The default model is MiniMax-M3. Override with MINIMAX_BASE_URL for the mainland-China endpoint (https://api.minimaxi.com/v1).

Notes

  • Temperature defaults to 1.0 because MiniMax requires temperature in (0.0, 1.0] and rejects 0.
  • The module imports OpenAILLMService directly (rather than going through the generic autodiscovery helper) so it works on the project's declared minimum Python 3.10 — Pipecat has no native MiniMax LLM service, only a TTS one, so this is the idiomatic wiring.

Testing

  • Verified the full path create_llm_service("minimax", ...) resolves to an OpenAILLMService with the correct base URL, default model MiniMax-M3, and temperature 1.0; model/base URL/temperature overrides are honored and missing-key validation fails early.
  • Confirmed against the live MiniMax OpenAI-compatible endpoint that the MiniMax-M3 model id and auth are accepted.
  • ruff check/ruff format clean on the new module.

MiniMax exposes an OpenAI-compatible chat-completions API, so the new
provider reuses Pipecat's OpenAILLMService pointed at the MiniMax base
URL (https://api.minimax.io/v1), mirroring how Pipecat wires other
OpenAI-compatible vendors such as Grok.

- Add models/llm/minimax.py with MiniMax-M3 as the default model
- Register "minimax" in the LLM provider catalog (requires MINIMAX_API_KEY)
- Default temperature to 1.0 since MiniMax rejects 0
- Document MINIMAX_API_KEY in env.example and the FastAPI README
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the akdeb'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