feat(fastapi): add MiniMax LLM provider#34
Open
octo-patch wants to merge 1 commit into
Open
Conversation
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
|
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. |
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
Adds MiniMax as a new LLM provider for the
server/fastapiclassic STT → LLM → TTS voice pipeline.MiniMax exposes an OpenAI-compatible chat-completions API, so the provider reuses Pipecat's
OpenAILLMServicepointed 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
models/llm/minimax.py— thin provider module, default modelMiniMax-M3"minimax"in the LLM provider catalog inmodels/providers.py(requiresMINIMAX_API_KEY); it now shows up in the/providersendpoint and is validated at startup like the other providersMINIMAX_API_KEY(and the optionalMINIMAX_BASE_URLoverride for the mainland-China endpoint) inenv.exampleREADME.md(provider list, required keys, module list, example stack)Usage
The default model is
MiniMax-M3. Override withMINIMAX_BASE_URLfor the mainland-China endpoint (https://api.minimaxi.com/v1).Notes
1.0because MiniMax requirestemperaturein(0.0, 1.0]and rejects0.OpenAILLMServicedirectly (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
create_llm_service("minimax", ...)resolves to anOpenAILLMServicewith the correct base URL, default modelMiniMax-M3, and temperature1.0; model/base URL/temperature overrides are honored and missing-key validation fails early.MiniMax-M3model id and auth are accepted.ruff check/ruff formatclean on the new module.