Skip to content

feat(model/minimax): add MiniMax ChatModel provider#741

Open
octo-patch wants to merge 3 commits into
cloudwego:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat(model/minimax): add MiniMax ChatModel provider#741
octo-patch wants to merge 3 commits into
cloudwego:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

Copy link
Copy Markdown

Summary

Add MiniMax as a new ChatModel provider for the Eino framework.

MiniMax provides OpenAI-compatible API endpoints, making integration clean and straightforward using the existing libs/acl/openai client.

Supported Models

Model Description
MiniMax-M2.7 Peak Performance. Ultimate Value. Master the Complex. (default)
MiniMax-M2.7-highspeed Same performance, faster and more agile

Both models support 204,800 tokens context window and up to 192K output tokens.

Features

  • Chat completion (Generate) and streaming (Stream)
  • Tool calling / Function calling via ToolCallingChatModel interface
  • Temperature auto-clamping to MiniMax's valid range (0.0, 1.0]
  • Callback integration for observability
  • Configurable base URL (global: api.minimax.io, China: api.minimaxi.com)

Files Added (8 files, ~1143 additions)

components/model/minimax/
├── chatmodel.go                  # Main provider implementation
├── chatmodel_test.go             # Unit tests (13 test cases)
├── chatmodel_integration_test.go # Integration tests (3 test cases, build tag: integration)
├── option.go                     # Provider-specific options
├── go.mod / go.sum               # Dependencies
├── README.md                     # English documentation
└── README_zh.md                  # Chinese documentation

Test Plan

  • Unit tests pass (13 test cases covering config validation, temperature clamping, Generate, Stream, WithTools, error handling)
  • Integration tests pass against real MiniMax API (Generate, Stream, highspeed model)
  • go mod tidy succeeds
  • Code follows existing provider patterns (OpenAI, OpenRouter)

Add MiniMax as a new ChatModel provider for the Eino framework,
supporting MiniMax-M2.7 and MiniMax-M2.7-highspeed models via the
OpenAI-compatible API.

Features:
- Chat completion (Generate) and streaming (Stream)
- Tool calling / Function calling support
- Temperature clamping to MiniMax's valid range (0.0, 1.0]
- Callback integration
- Configurable base URL (global: api.minimax.io, China: api.minimaxi.com)
- Unit tests (13 test cases) and integration tests (3 test cases)
- Bilingual README (English + Chinese)
@CLAassistant

CLAassistant commented Mar 19, 2026

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 all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ tangchaojun-bytedance
❌ PR Bot


PR Bot 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.

@shentongmartin shentongmartin added C-enhancement This is a PR that adds a new feature or fixes a bug. D-chatmodel-impl Domain: This is an issue related to particular ChatModel implementation labels Mar 27, 2026
@tangchaojun-bytedance

Copy link
Copy Markdown
Collaborator

@octo-patch hello, thanks for your pr. please check CI results and solve them.

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

Labels

C-enhancement This is a PR that adds a new feature or fixes a bug. D-chatmodel-impl Domain: This is an issue related to particular ChatModel implementation

Development

Successfully merging this pull request may close these issues.

4 participants