From 038f3542bdfa3691ac71ae5f12da631c83ebceb0 Mon Sep 17 00:00:00 2001 From: xieyuanxiang <124608760@qq.com> Date: Sat, 9 May 2026 23:25:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AA=92=E4=BD=93=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E6=94=B9=E7=94=A8=E5=8A=A8=E6=80=81=20provider=20=E5=8F=91?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E7=A7=BB=E9=99=A4=E7=A1=AC=E7=BC=96=E7=A0=81?= =?UTF-8?q?=20providerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit minimax-music-gen (1.1.2 → 1.1.3): - providerId: "provider-minimax-media-001" → provider: "minimax" + serviceType: "music_gen" minimax-video-gen (1.2.1 → 1.2.2): - providerId: "provider-minimax-media-001" → provider: "minimax" + serviceType: "video_gen" 此前硬编码的 provider-minimax-media-001 在系统中不存在,导致使用 MiniMax Token Plan 或 Coding Plan 时文生音乐/文生视频功能无法路由。 改为 slug + serviceType 动态发现后,无论用户启用按量 API 还是 Token/Coding Plan,findProvider() 都能正确匹配。 --- skills/minimax-music-gen/SKILL.md | 13 ++++++++----- skills/minimax-music-gen/SKILL.zh-CN.md | 11 +++++++---- skills/minimax-video-gen/SKILL.md | 18 +++++++++++------- skills/minimax-video-gen/SKILL.zh-CN.md | 16 ++++++++++------ 4 files changed, 36 insertions(+), 22 deletions(-) diff --git a/skills/minimax-music-gen/SKILL.md b/skills/minimax-music-gen/SKILL.md index 6fa3d55..679ac2f 100644 --- a/skills/minimax-music-gen/SKILL.md +++ b/skills/minimax-music-gen/SKILL.md @@ -7,7 +7,7 @@ description: >- AI 作曲、创作歌曲、写一首歌、音乐生成、AI 音乐、MiniMax 音乐、 作词作曲、纯音乐、伴奏、翻唱、cover。 license: Complete terms in LICENSE.txt -version: 1.1.2 +version: 1.1.3 type: procedural risk_level: low status: enabled @@ -123,7 +123,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "music_gen", "endpoint": "/music_generation", "body": { "model": "music-2.6", @@ -146,7 +147,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "music_gen", "endpoint": "/music_generation", "body": { "model": "music-2.6", @@ -259,7 +261,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "music_gen", "endpoint": "/music_generation", "body": { "model": "music-2.6", @@ -282,7 +285,7 @@ curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ - `base_resp.status_code: 1008`: insufficient balance - `base_resp.status_code: 1026`: content sensitive, modify the lyrics or prompt and retry - `base_resp.status_code: 2013`: parameter error, check required fields -- `success: false` + `error: "未找到匹配的供应商"`: MiniMax Provider not configured +- `success: false` + `error: "未找到匹配的供应商"`: No enabled MiniMax provider with `music_gen` service found ### Notes diff --git a/skills/minimax-music-gen/SKILL.zh-CN.md b/skills/minimax-music-gen/SKILL.zh-CN.md index 0e1856e..990d6bf 100644 --- a/skills/minimax-music-gen/SKILL.zh-CN.md +++ b/skills/minimax-music-gen/SKILL.zh-CN.md @@ -58,7 +58,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "music_gen", "endpoint": "/music_generation", "body": { "model": "music-2.6", @@ -81,7 +82,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "music_gen", "endpoint": "/music_generation", "body": { "model": "music-2.6", @@ -194,7 +196,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "music_gen", "endpoint": "/music_generation", "body": { "model": "music-2.6", @@ -217,7 +220,7 @@ curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ - `base_resp.status_code: 1008`:余额不足 - `base_resp.status_code: 1026`:内容敏感,修改歌词或 prompt 后重试 - `base_resp.status_code: 2013`:参数错误,检查必填字段 -- `success: false` + `error: "未找到匹配的供应商"`:未配置 MiniMax Provider +- `success: false` + `error: "未找到匹配的供应商"`:未找到已启用且支持 `music_gen` 服务的 MiniMax Provider ### 注意事项 diff --git a/skills/minimax-video-gen/SKILL.md b/skills/minimax-video-gen/SKILL.md index c05a1c9..5e4f03f 100644 --- a/skills/minimax-video-gen/SKILL.md +++ b/skills/minimax-video-gen/SKILL.md @@ -7,7 +7,7 @@ description: >- Use when 用户提到 生成视频、文生视频、AI 视频、创建视频、视频生成、 动画生成、MiniMax 视频、海螺、Hailuo、图片变视频、图生视频。 license: Complete terms in LICENSE.txt -version: 1.2.1 +version: 1.2.2 type: procedural risk_level: low status: enabled @@ -76,7 +76,7 @@ market: ### Prerequisites -- The user has already configured the MiniMax Media Provider in Resource Manager → Compute and entered the API Key +- The user has already configured and enabled a MiniMax Provider (regular API or Token Plan) in Resource Manager → Compute and entered the API Key - agent-service is running ### Core Concept: Three-Step Asynchronous Flow @@ -107,7 +107,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "video_gen", "endpoint": "/video_generation", "body": { "model": "MiniMax-Hailuo-2.3", @@ -130,7 +131,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "video_gen", "endpoint": "/video_generation", "body": { "model": "MiniMax-Hailuo-2.3", @@ -151,7 +153,8 @@ TASK_ID="task_id returned from step 1" curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d "{ - \"providerId\": \"provider-minimax-media-001\", + \"provider\": \"minimax\", + \"serviceType\": \"video_gen\", \"endpoint\": \"/query/video_generation?task_id=${TASK_ID}\", \"method\": \"GET\", \"responseType\": \"json\" @@ -192,7 +195,8 @@ FILE_ID="file_id returned from step 2" curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d "{ - \"providerId\": \"provider-minimax-media-001\", + \"provider\": \"minimax\", + \"serviceType\": \"video_gen\", \"endpoint\": \"/files/retrieve?file_id=${FILE_ID}\", \"method\": \"GET\", \"responseType\": \"json\" @@ -226,7 +230,7 @@ Write Markdown image syntax directly in your reply (the frontend will automatica ### Error Handling - `status: "Fail"`: video generation failed; explain to the user -- `success: false` + `error: "No matching provider found"`: MiniMax Media Provider is not configured +- `success: false` + `error: "No matching provider found"`: No enabled MiniMax provider with `video_gen` service found - `success: false` + `error: "API Key not configured"`: API Key has not been entered - **Insufficient quota** (errors related to `statusCode: 429`, `insufficient_quota`, `balance`): text-to-video cannot fall back (the Fast model does not support T2V); inform the user of insufficient quota; image-to-video can switch to `MiniMax-Hailuo-2.3-fast` and retry from Step 1 - Polling exceeds 10 minutes without completion: inform the user that the task may have timed out diff --git a/skills/minimax-video-gen/SKILL.zh-CN.md b/skills/minimax-video-gen/SKILL.zh-CN.md index dd9ee48..0a630c9 100644 --- a/skills/minimax-video-gen/SKILL.zh-CN.md +++ b/skills/minimax-video-gen/SKILL.zh-CN.md @@ -12,7 +12,7 @@ ### 前置条件 -- 用户已在资源管理器-算力中配置 MiniMax Media Provider 并填写 API Key +- 用户已在资源管理器-算力中配置并启用 MiniMax Provider(常规 API 或 Token Plan)并填写 API Key - agent-service 正在运行 ### 核心概念:三步异步流程 @@ -43,7 +43,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "video_gen", "endpoint": "/video_generation", "body": { "model": "MiniMax-Hailuo-2.3", @@ -66,7 +67,8 @@ PORT=$(cat ~/.desirecore/agent-service.port) curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d '{ - "providerId": "provider-minimax-media-001", + "provider": "minimax", + "serviceType": "video_gen", "endpoint": "/video_generation", "body": { "model": "MiniMax-Hailuo-2.3", @@ -87,7 +89,8 @@ TASK_ID="第一步返回的task_id" curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d "{ - \"providerId\": \"provider-minimax-media-001\", + \"provider\": \"minimax\", + \"serviceType\": \"video_gen\", \"endpoint\": \"/query/video_generation?task_id=${TASK_ID}\", \"method\": \"GET\", \"responseType\": \"json\" @@ -128,7 +131,8 @@ FILE_ID="第二步返回的file_id" curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \ -H "Content-Type: application/json" \ -d "{ - \"providerId\": \"provider-minimax-media-001\", + \"provider\": \"minimax\", + \"serviceType\": \"video_gen\", \"endpoint\": \"/files/retrieve?file_id=${FILE_ID}\", \"method\": \"GET\", \"responseType\": \"json\" @@ -162,7 +166,7 @@ curl -sk -X POST "https://127.0.0.1:${PORT}/api/media/upload" \ ### 错误处理 - `status: "Fail"`:视频生成失败,向用户说明 -- `success: false` + `error: "未找到匹配的供应商"`:未配置 MiniMax Media Provider +- `success: false` + `error: "未找到匹配的供应商"`:未找到已启用且支持 `video_gen` 服务的 MiniMax Provider - `success: false` + `error: "未配置 API Key"`:未填写 API Key - **额度不足**(`statusCode: 429`、`insufficient_quota`、`balance` 相关错误):文生视频无法降级(Fast 模型不支持 T2V),告知用户额度不足;图生视频可换用 `MiniMax-Hailuo-2.3-fast` 从第一步重试 - 轮询超过 10 分钟未完成:告知用户任务可能超时