Skip to content

feat: add MiniMaxChatGenerator component#11076

Closed
octo-patch wants to merge 1 commit intodeepset-ai:mainfrom
octo-patch:feature/add-minimax-provider
Closed

feat: add MiniMaxChatGenerator component#11076
octo-patch wants to merge 1 commit intodeepset-ai:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

This PR adds MiniMaxChatGenerator, a new Haystack component that integrates MiniMax LLMs via MiniMax's OpenAI-compatible API.

  • Add MiniMaxChatGenerator to haystack/components/generators/chat/
  • Supports MiniMax-M2.7 (default) and MiniMax-M2.7-highspeed models
  • Uses MINIMAX_API_KEY environment variable for authentication
  • Default base URL: https://api.minimax.io/v1
  • Inherits all capabilities from OpenAIChatGenerator: streaming, tool calling, serialization/deserialization, async support
  • Add unit tests covering initialization, serialization, and round-trip deserialization
  • Add release note

Usage

from haystack.components.generators.chat import MiniMaxChatGenerator
from haystack.dataclasses import ChatMessage

# Set MINIMAX_API_KEY environment variable
client = MiniMaxChatGenerator()  # uses MiniMax-M2.7 by default
response = client.run([ChatMessage.from_user("Hello!")])
print(response["replies"][0].text)

API Reference

- Add MiniMaxChatGenerator using MiniMax's OpenAI-compatible API
- Support MiniMax-M2.7 and MiniMax-M2.7-highspeed models
- Add MINIMAX_API_KEY environment variable support
- Add unit tests for initialization, serialization, and configuration
- Add release note
@octo-patch octo-patch requested a review from a team as a code owner April 11, 2026 07:15
@octo-patch octo-patch requested review from sjrl and removed request for a team April 11, 2026 07:15
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 11, 2026

Someone is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


octo-patch seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions Bot added topic:tests type:documentation Improvements on the docs labels Apr 11, 2026
@sjrl sjrl requested review from julian-risch and removed request for sjrl April 11, 2026 18:01
@julian-risch
Copy link
Copy Markdown
Member

Hi @octo-patch Thank you for opening this pull request. Without the CLA we can't merge this PR. Either way, I recommend to publish and release this integration yourself using our repository template if you think it's beneficial to users. https://github.com/deepset-ai/custom-component
I'd argue users can use the OpenAIChatGenerator class and set the custom base url themselves?
Regarding the implementation, one thing I noticed is that there shouldn't be a need to re-implement to_dict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:tests type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants