[PR #1135] [MERGED] feat: Update MiniMax provider with V2 API support and new M1 model #1730

Closed
opened 2026-02-16 10:23:48 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/1135
Author: @onlylhf
Created: 6/20/2025
Status: Merged
Merged: 6/22/2025
Merged by: @crazywoola

Base: mainHead: main


📝 Commits (10+)

  • 42d181e add qwen3
  • ca79fb5 Merge branch 'langgenius:main' into main
  • 7e44a41 Merge branch 'langgenius:main' into main
  • 80092af Merge branch 'langgenius:main' into main
  • dd5b979 Merge branch 'langgenius:main' into main
  • 163c5c5 Merge branch 'langgenius:main' into main
  • c6d78be feat: Update MiniMax provider with V2 API support and new M1 model
  • 5b67844 chore: Update MiniMax plugin version to 0.0.8
  • cd45cb4 Update models/minimax/requirements.txt
  • 69886dc feat: Enhance MiniMax tool calling support across API versions

📊 Changes

17 files changed (+1095 additions, -403 deletions)

View changed files

📝 .gitignore (+2 -0)
📝 models/minimax/manifest.yaml (+6 -5)
📝 models/minimax/models/llm/chat_completion.py (+9 -5)
📝 models/minimax/models/llm/chat_completion_pro.py (+11 -6)
models/minimax/models/llm/chat_completion_v2.py (+442 -0)
📝 models/minimax/models/llm/llm.py (+156 -37)
models/minimax/models/llm/minimax-m1.yaml (+37 -0)
📝 models/minimax/models/llm/types.py (+71 -10)
📝 models/minimax/models/text_embedding/text_embedding.py (+6 -3)
📝 models/minimax/models/tts/speech-01-hd.yaml (+62 -62)
📝 models/minimax/models/tts/speech-01-turbo.yaml (+62 -62)
📝 models/minimax/models/tts/speech-02-hd.yaml (+62 -62)
📝 models/minimax/models/tts/speech-02-turbo.yaml (+62 -62)
📝 models/minimax/models/tts/tts.py (+94 -86)
📝 models/minimax/provider/minimax.py (+1 -1)
📝 models/minimax/provider/minimax.yaml (+11 -1)
📝 models/minimax/requirements.txt (+1 -1)

📄 Description

Related Issues or Context

Update MiniMax provider to support the latest V2 API and add new MiniMax-M1 model with enhanced capabilities including agent-thought, tool-call, and stream-tool-call features. This update improves compatibility with OpenAI format and enhances the overall functionality of the MiniMax integration.

fix https://github.com/langgenius/dify-official-plugins/issues/1026
fix https://github.com/langgenius/dify-official-plugins/issues/821
fix https://github.com/langgenius/dify-official-plugins/issues/476

This PR contains Changes to Non-Plugin

  • Documentation
  • Other

This PR contains Changes to Non-LLM Models Plugin

  • I have Run Comprehensive Tests Relevant to My Changes

This PR contains Changes to LLM Models Plugin

LLM:
82da9928df997f5a38d9bbb2f44be1d5

text_embedding:
78bac040f3f0c204081f3d8c85e80cf1

tts:
20b7c18aff5f65d69cca87c939c8355b

d28304db692c2a948c82d7d6d36e6dd6

  • My Changes Affect Message Flow Handling (System Messages and User→Assistant Turn-Taking)

Added V2 API support with improved message format handling and role mapping

  • My Changes Affect Tool Interaction Flow (Multi-Round Usage and Output Handling, for both Agent App and Agent Node)

Enhanced tool call support with OpenAI-compatible format and improved function call handling

  • My Changes Affect Multimodal Input Handling (Images, PDFs, Audio, Video, etc.)
  • My Changes Affect Multimodal Output Generation (Images, Audio, Video, etc.)

Updated TTS models configuration and implementation

  • My Changes Affect Structured Output Format (JSON, XML, etc.)
  • My Changes Affect Token Consumption Metrics

Updated pricing information for new MiniMax-M1 model

  • My Changes Affect Other LLM Functionalities (Reasoning Process, Grounding, Prompt Caching, etc.)

Added support for agent-thought feature in MiniMax-M1 model

  • Other Changes (Add New Models, Fix Model Parameters etc.)

Added new MiniMax-M1 model with 1M context size and enhanced parameter configuration

Version Control (Any Changes to the Plugin Will Require Bumping the Version)

  • I have Bumped Up the Version in Manifest.yaml (Top-Level Version Field, Not in Meta Section)

Dify Plugin SDK Version

  • I'm Using dify_plugin>=0.3.0,<0.4.0 in requirements.txt (SDK docs)

Environment Verification (If Any Code Changes)

Local Deployment Environment

  • Dify Version is: , I have Tested My Changes on Local Deployment Dify with a Clean Environment That Matches the Production Configuration.

SaaS Environment

  • I have Tested My Changes on cloud.dify.ai with a Clean Environment That Matches the Production Configuration

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/1135 **Author:** [@onlylhf](https://github.com/onlylhf) **Created:** 6/20/2025 **Status:** ✅ Merged **Merged:** 6/22/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (10+) - [`42d181e`](https://github.com/langgenius/dify-official-plugins/commit/42d181e4993f5349e94affc90c4504ef92e039e9) add qwen3 - [`ca79fb5`](https://github.com/langgenius/dify-official-plugins/commit/ca79fb5afb5d3631605680a0e07808872b3b2de5) Merge branch 'langgenius:main' into main - [`7e44a41`](https://github.com/langgenius/dify-official-plugins/commit/7e44a4145d743d01828409d4917e3fb27f9f5f4b) Merge branch 'langgenius:main' into main - [`80092af`](https://github.com/langgenius/dify-official-plugins/commit/80092af045d1aa3d24d7009c9c3495e0d2293a2a) Merge branch 'langgenius:main' into main - [`dd5b979`](https://github.com/langgenius/dify-official-plugins/commit/dd5b979d63a23eb24abef61072d59b9d28a731ce) Merge branch 'langgenius:main' into main - [`163c5c5`](https://github.com/langgenius/dify-official-plugins/commit/163c5c5f0df9cb05102271afdeaad9e4c63d59c5) Merge branch 'langgenius:main' into main - [`c6d78be`](https://github.com/langgenius/dify-official-plugins/commit/c6d78be66640a2c8fb62343f7965137a7785d5cf) feat: Update MiniMax provider with V2 API support and new M1 model - [`5b67844`](https://github.com/langgenius/dify-official-plugins/commit/5b678449e2faf70fed21376a7c97fd249106cb1e) chore: Update MiniMax plugin version to 0.0.8 - [`cd45cb4`](https://github.com/langgenius/dify-official-plugins/commit/cd45cb472cb4c9627945e6e6a2a7c027ecda926f) Update models/minimax/requirements.txt - [`69886dc`](https://github.com/langgenius/dify-official-plugins/commit/69886dcaad4385bac1270325d5281a70a23a0a1f) feat: Enhance MiniMax tool calling support across API versions ### 📊 Changes **17 files changed** (+1095 additions, -403 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) 📝 `models/minimax/manifest.yaml` (+6 -5) 📝 `models/minimax/models/llm/chat_completion.py` (+9 -5) 📝 `models/minimax/models/llm/chat_completion_pro.py` (+11 -6) ➕ `models/minimax/models/llm/chat_completion_v2.py` (+442 -0) 📝 `models/minimax/models/llm/llm.py` (+156 -37) ➕ `models/minimax/models/llm/minimax-m1.yaml` (+37 -0) 📝 `models/minimax/models/llm/types.py` (+71 -10) 📝 `models/minimax/models/text_embedding/text_embedding.py` (+6 -3) 📝 `models/minimax/models/tts/speech-01-hd.yaml` (+62 -62) 📝 `models/minimax/models/tts/speech-01-turbo.yaml` (+62 -62) 📝 `models/minimax/models/tts/speech-02-hd.yaml` (+62 -62) 📝 `models/minimax/models/tts/speech-02-turbo.yaml` (+62 -62) 📝 `models/minimax/models/tts/tts.py` (+94 -86) 📝 `models/minimax/provider/minimax.py` (+1 -1) 📝 `models/minimax/provider/minimax.yaml` (+11 -1) 📝 `models/minimax/requirements.txt` (+1 -1) </details> ### 📄 Description ## Related Issues or Context <!-- ⚠️ NOTE: This repository is for Dify Official Plugins only. For community contributions, please submit to https://github.com/langgenius/dify-plugins instead. - Link Related Issues if Applicable: #issue_number - Or Provide Context about Why this Change is Needed --> Update MiniMax provider to support the latest V2 API and add new MiniMax-M1 model with enhanced capabilities including agent-thought, tool-call, and stream-tool-call features. This update improves compatibility with OpenAI format and enhances the overall functionality of the MiniMax integration. fix https://github.com/langgenius/dify-official-plugins/issues/1026 fix https://github.com/langgenius/dify-official-plugins/issues/821 fix https://github.com/langgenius/dify-official-plugins/issues/476 ## This PR contains Changes to *Non-Plugin* <!-- Put an `x` in all the boxes that apply by replacing [ ] with [x] For example: - [x] Documentation --> - [ ] Documentation - [ ] Other ## This PR contains Changes to *Non-LLM Models Plugin* - [ ] I have Run Comprehensive Tests Relevant to My Changes <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> ## This PR contains Changes to *LLM Models Plugin* <!-- LLM Models Test Example: --> <!-- https://github.com/langgenius/dify-official-plugins/blob/main/.assets/test-examples/llm-plugin-tests/llm_test_example.md --> LLM: ![82da9928df997f5a38d9bbb2f44be1d5](https://github.com/user-attachments/assets/b204a3af-c955-4c7a-86f6-9311fb1d87bf) text_embedding: ![78bac040f3f0c204081f3d8c85e80cf1](https://github.com/user-attachments/assets/2df7098e-a2c5-456f-8d21-c1f50e3abb8b) tts: ![20b7c18aff5f65d69cca87c939c8355b](https://github.com/user-attachments/assets/d70b144b-d5e5-4f7c-9773-906f6d4d3865) ![d28304db692c2a948c82d7d6d36e6dd6](https://github.com/user-attachments/assets/3c61b83f-e780-4416-8de0-937b29d7b9bf) - [x] My Changes Affect Message Flow Handling (System Messages and User→Assistant Turn-Taking) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> *Added V2 API support with improved message format handling and role mapping* - [x] My Changes Affect Tool Interaction Flow (Multi-Round Usage and Output Handling, for both Agent App and Agent Node) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> *Enhanced tool call support with OpenAI-compatible format and improved function call handling* - [ ] My Changes Affect Multimodal Input Handling (Images, PDFs, Audio, Video, etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> - [x] My Changes Affect Multimodal Output Generation (Images, Audio, Video, etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> *Updated TTS models configuration and implementation* - [ ] My Changes Affect Structured Output Format (JSON, XML, etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> - [x] My Changes Affect Token Consumption Metrics <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> *Updated pricing information for new MiniMax-M1 model* - [x] My Changes Affect Other LLM Functionalities (Reasoning Process, Grounding, Prompt Caching, etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> *Added support for agent-thought feature in MiniMax-M1 model* - [x] Other Changes (Add New Models, Fix Model Parameters etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> *Added new MiniMax-M1 model with 1M context size and enhanced parameter configuration* ## Version Control (Any Changes to the Plugin Will Require Bumping the Version) - [x] I have Bumped Up the Version in Manifest.yaml (Top-Level `Version` Field, Not in Meta Section) <!-- ⚠️ NOTE: Version Format: MAJOR.MINOR.PATCH - MAJOR (0.x.x): Reserved for Significant architectural changes or incompatible API modifications - MINOR (x.0.x): For New feature additions while maintaining backward compatibility - PATCH (x.x.0): For Backward-compatible bug fixes and minor improvements - Note: Each Version Component (MAJOR, MINOR, PATCH) Can Be 2 Digits, e.g., 10.11.22 --> ## Dify Plugin SDK Version - [ ] I'm Using `dify_plugin>=0.3.0,<0.4.0` in requirements.txt ([SDK docs](https://github.com/langgenius/dify-plugin-sdks/blob/main/python/README.md)) ## Environment Verification (If Any Code Changes) <!-- ⚠️ NOTE: At Least One Environment Must Be Tested. --> ### Local Deployment Environment - [ ] Dify Version is: <!-- Specify Your Version (e.g., 1.2.0) -->, I have Tested My Changes on Local Deployment Dify with a Clean Environment That Matches the Production Configuration. <!-- - Python Virtual Env Matching Manifest.yaml & requirements.txt - No Breaking Changes in Dify That May Affect the Testing Result --> ### SaaS Environment - [ ] I have Tested My Changes on cloud.dify.ai with a Clean Environment That Matches the Production Configuration <!-- - Python Virtual Env Matching Manifest.yaml & requirements.txt --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:23:48 -05:00
yindo closed this issue 2026-02-16 10:23:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#1730