feat: add and expand MiniMax provider support#182
feat: add and expand MiniMax provider support#182Hi-Jiajun wants to merge 16 commits intoTHU-MAIC:mainfrom
Conversation
- Add 'minimax-image' to ImageProviderId union - Implement minimax-image-adapter with generateWithMiniMaxImage and testMiniMaxImageConnectivity - Register adapter in image-providers.ts (generateImage + testImageConnectivity) - Add IMAGE_MINIMAX to IMAGE_ENV_MAP in provider-config.ts - Add provider name and icon mappings in settings/index.tsx - Add i18n entries (zh + en) for providerMiniMaxImage - Add IMAGE_MINIMAX_API_KEY / BASE_URL to .env.example - Model: image-01, supports 1:1/16:9/4:3/9:16 aspect ratios
- Add 'minimax-video' to VideoProviderId union - Implement minimax-video-adapter: async task pattern (submit → poll → get URL) - POST /v1/video_generation to submit - GET /v1/query/video_generation?task_id=xxx to poll status - Supports Hailuo 2.3, Hailuo 02, T2V-01-Director, T2V-01 models - Supports 6s/10s duration, 720P/1080P resolution - Register adapter in video-providers.ts (generateVideo + testVideoConnectivity) - Add VIDEO_MINIMAX to VIDEO_ENV_MAP in provider-config.ts - Add provider name and icon mappings in settings/index.tsx - Add i18n entries (zh + en) for providerMiniMaxVideo - Add VIDEO_MINIMAX_API_KEY / BASE_URL to .env.example
# Conflicts: # .env.example # components/generation/media-popover.tsx # components/settings/audio-settings.tsx # components/settings/index.tsx # lib/audio/constants.ts # lib/audio/tts-providers.ts # lib/audio/types.ts # lib/i18n/settings.ts # lib/server/provider-config.ts # lib/store/settings.ts
|
Synced this branch with the latest This keeps the MiniMax image, video, and TTS changes aligned with the then-current main branch, including the newer Grok and ElevenLabs provider additions, so the PR is easier to review against a current baseline. |
# Conflicts: # components/settings/audio-settings.tsx
|
Synced this branch again with the latest The branch returned to a mergeable state after that sync, and the refreshed |
wyuc
left a comment
There was a problem hiding this comment.
Three issues:
-
LLM
defaultBaseUrldropped the/anthropic/v1suffix. Since MiniMax usestype: 'anthropic', this will break all LLM calls. -
Base URLs are inconsistent across .env.example, README EN, README ZH, and adapter code (mixing
api.minimaxi.com,api.minimax.com,api.minimax.io). Please unify per service. -
Please verify the video adapter's file download path. The code constructs
/v1/files/${file_id}as the URL directly. Check if MiniMax requires a separate file retrieval call instead.
Also consider adding MiniMax-M2.7 (non-highspeed) from PR #170 since this PR is the more comprehensive MiniMax addition.
|
Addressed the latest review feedback in commit
Also added a small Vitest check for the MiniMax provider defaults. Local |
|
Follow-up adjustment in commit
I initially removed it while narrowing the list, but the official MiniMax video/model documentation does list it, so the PR now keeps the video model list aligned with MiniMax's published availability. |
Summary
This PR adds and expands MiniMax support across OpenMAIC's built-in providers, including LLM, TTS, image, and video.
What changed
https://api.minimaxi.comMiniMax-M2,MiniMax-M2.1,MiniMax-M2.1-lightning,MiniMax-M2.1-highspeed,MiniMax-M2.5,MiniMax-M2.5-lightning,MiniMax-M2.5-highspeed, andMiniMax-M2.7-highspeedspeech-2.8-turbo,speech-2.8-hd,speech-2.6-turbo,speech-2.6-hd,speech-02-turbo,speech-02-hdttsModelthrough/api/generate/ttshttps://api.minimaxi.comminimax-imageprovider integrationimage-01andimage-01-livehttps://api.minimaxi.comminimax-videoprovider integrationMiniMax-Hailuo-2.3,MiniMax-Hailuo-2.3-Fast,MiniMax-Hailuo-02,T2V-01-Director, andT2V-01https://api.minimaxi.com.env.example,README.md, andREADME-zh.mdwith MiniMax examples and updated defaultsValidation
pnpm eslint lib/ai/providers.tspnpm eslint lib/audio/constants.ts lib/media/image-providers.ts lib/media/video-providers.ts lib/ai/providers.tspnpm eslint components/settings/audio-settings.tsx app/api/generate/tts/route.ts lib/store/settings.ts lib/audio/constants.ts lib/audio/tts-providers.tspnpm buildNotes