Skip to content

feat(models): add MiniMax model support#1302

Open
ximiximi423 wants to merge 2 commits intoagentscope-ai:mainfrom
ximiximi423:feat/minimax-m2.5-support
Open

feat(models): add MiniMax model support#1302
ximiximi423 wants to merge 2 commits intoagentscope-ai:mainfrom
ximiximi423:feat/minimax-m2.5-support

Conversation

@ximiximi423
Copy link

@ximiximi423 ximiximi423 commented Mar 9, 2026

Summary

  • Add support for MiniMax-M2.5 and MiniMax-M2.5-highspeed chat models via OpenAI-compatible API
  • Add support for MiniMax TTS models (speech-2.8-hd, speech-2.8-turbo, etc.) via T2A v2 HTTP API
  • 17 comprehensive unit tests (9 chat model + 8 TTS)

Chat Model Details

MiniMax-M2.5 Model Features

  • OpenAI-compatible API: Uses the openai SDK with MiniMax base URL
  • Interleaved Thinking: Parses <think>...</think> tags into ThinkingBlock objects
  • Tool Calling: Full support for function calling with tools and tool_choice
  • Streaming: Both streaming and non-streaming modes
  • Structured Output: Pydantic BaseModel support

Usage Example

from agentscope.model import MiniMaxChatModel
model = MiniMaxChatModel(model_name="MiniMax-M2.5", api_key="your-key")

TTS Model Details

MiniMax TTS Features

  • T2A v2 HTTP API: Direct HTTP calls via httpx
  • Multiple Models: speech-2.8-hd (default), speech-2.8-turbo, etc.
  • Streaming: Newline-delimited JSON streaming
  • Voice Settings: Configurable voice_id, speed, volume, pitch, emotion
  • Audio Formats: mp3, pcm, flac, wav

Usage Example

from agentscope.tts import MiniMaxTTSModel
tts = MiniMaxTTSModel(api_key="your-key", model_name="speech-2.8-hd")

Test plan

  • All 17 new unit tests pass
  • All 373 total tests pass (0 failures)

Add support for MiniMax-M2.5 and MiniMax-M2.5-highspeed models using
the OpenAI-compatible API with MiniMax-specific handling for <think>
tag parsing, default base URL, and interleaved reasoning content.

Components added:
- MiniMaxChatModel: chat model class with streaming, tools, and
  structured output support
- MiniMaxChatFormatter: single-agent message formatter
- MiniMaxMultiAgentFormatter: multi-agent conversation formatter
- Comprehensive unit tests (9 test cases)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cla-assistant
Copy link

cla-assistant bot commented Mar 9, 2026

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.
You have signed the CLA already but the status is still pending? Let us recheck it.

Add MiniMaxTTSModel using the MiniMax T2A v2 HTTP API with support for
streaming and non-streaming synthesis, configurable voice settings,
audio format options, and multiple model variants (speech-2.8-hd, etc.).

Components added:
- MiniMaxTTSModel: TTS model class using httpx for direct API calls
- Hex-to-base64 audio conversion for API response parsing
- Streaming support with newline-delimited JSON parsing
- 8 comprehensive unit tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ximiximi423 ximiximi423 changed the title feat(models): add MiniMax-M2.5 series model support feat(models): add MiniMax model support Mar 9, 2026
@qbc2016
Copy link
Member

qbc2016 commented Mar 17, 2026

Thank you for the contribution!

The MiniMax official documentation recommends using the Anthropic-compatible API, so I wonder if we could just use AnthropicChatModel and AnthropicFormatter instead?

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.

2 participants