mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-06-06 05:50:41 +08:00
fix: 媒体技能改用动态 provider 发现,移除硬编码 providerId
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() 都能正确匹配。
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
### 注意事项
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 分钟未完成:告知用户任务可能超时
|
||||
|
||||
Reference in New Issue
Block a user