Skip to content

Commit 86ebcee

Browse files
clawsweeper[bot]neeravmakwanaTakhoffman
authored
fix(minimax): stop advertising music duration control (#84765)
Summary: - The PR removes MiniMax music duration support from provider capabilities and docs, stops prompt-injecting duration hints, updates the MiniMax provider test, and adds a changelog entry. - Reproducibility: yes. by source inspection: current main advertises MiniMax duration support while the reque ... uage hint. I did not rerun a live pre-fix MiniMax request, but the code path and vendor contract are clear. Automerge notes: - PR branch already contained follow-up commit before automerge: docs(minimax): align music controls - PR branch already contained follow-up commit before automerge: docs(music): remove minimax duration steering claim - PR branch already contained follow-up commit before automerge: fix(minimax): stop advertising music duration control Validation: - ClawSweeper review passed for head 1c616da. - Required merge gates passed before the squash merge. Prepared head SHA: 1c616da Review: #84765 (comment) Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
1 parent c4f14a3 commit 86ebcee

5 files changed

Lines changed: 16 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Docs: https://docs.openclaw.ai
1818
### Fixes
1919

2020
- Codex app-server: keep system-prompt reports working when bootstrap hooks provide workspace files with only a path and content, so hook-supplied SOUL/IDENTITY/TOOLS/USER context still reports injected characters correctly. (#84736) Thanks @JARVIS-Glasses.
21+
- Providers/MiniMax music: stop advertising `durationSeconds` control and remove prompt-injected duration hints, so `music_generate` reports MiniMax duration as an unsupported override instead of suggesting MiniMax can enforce track length. Fixes #84508. Thanks @neeravmakwana.
2122
- WhatsApp: update Baileys to `7.0.0-rc12`.
2223
- Build: suppress per-locale `rolldown-plugin-dts:fake-js` CommonJS dts warnings emitted while bundling the intentionally-inlined `zod/v4/locales/*.d.cts` files, so `pnpm build` output stays readable after the 0.25.1 plugin bump. Thanks @romneyda.
2324
- CLI/nodes: route lazy plugin-registration logs to stderr for JSON-mode `openclaw nodes` commands so stdout stays parseable. (#84684) Thanks @TurboTheTurtle.

docs/providers/minimax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ The bundled MiniMax plugin registers music generation through the shared
292292
- Default music model: `minimax/music-2.6`
293293
- OAuth music model: `minimax-portal/music-2.6`
294294
- Also supports `minimax/music-2.5` and `minimax/music-2.0`
295-
- Prompt controls: `lyrics`, `instrumental`, `durationSeconds`
295+
- Prompt controls: `lyrics`, `instrumental`
296296
- Output format: `mp3`
297297
- Session-backed runs detach through the shared task/status flow, including `action: "status"`
298298

docs/tools/music-generation.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ Generate an energetic chiptune loop about launching a rocket at sunrise.
9494

9595
## Supported providers
9696

97-
| Provider | Default model | Reference inputs | Supported controls | Auth |
98-
| ---------- | ---------------------------- | ---------------- | --------------------------------------------------------- | -------------------------------------- |
99-
| ComfyUI | `workflow` | Up to 1 image | Workflow-defined music or audio | `COMFY_API_KEY`, `COMFY_CLOUD_API_KEY` |
100-
| fal | `fal-ai/minimax-music/v2.6` | None | `lyrics`, `instrumental`, `durationSeconds`, `format` | `FAL_KEY` or `FAL_API_KEY` |
101-
| Google | `lyria-3-clip-preview` | Up to 10 images | `lyrics`, `instrumental`, `format` | `GEMINI_API_KEY`, `GOOGLE_API_KEY` |
102-
| MiniMax | `music-2.6` | None | `lyrics`, `instrumental`, `durationSeconds`, `format=mp3` | `MINIMAX_API_KEY` or MiniMax OAuth |
103-
| OpenRouter | `google/lyria-3-pro-preview` | Up to 1 image | `lyrics`, `instrumental`, `durationSeconds`, `format` | `OPENROUTER_API_KEY` |
97+
| Provider | Default model | Reference inputs | Supported controls | Auth |
98+
| ---------- | ---------------------------- | ---------------- | ----------------------------------------------------- | -------------------------------------- |
99+
| ComfyUI | `workflow` | Up to 1 image | Workflow-defined music or audio | `COMFY_API_KEY`, `COMFY_CLOUD_API_KEY` |
100+
| fal | `fal-ai/minimax-music/v2.6` | None | `lyrics`, `instrumental`, `durationSeconds`, `format` | `FAL_KEY` or `FAL_API_KEY` |
101+
| Google | `lyria-3-clip-preview` | Up to 10 images | `lyrics`, `instrumental`, `format` | `GEMINI_API_KEY`, `GOOGLE_API_KEY` |
102+
| MiniMax | `music-2.6` | None | `lyrics`, `instrumental`, `format=mp3` | `MINIMAX_API_KEY` or MiniMax OAuth |
103+
| OpenRouter | `google/lyria-3-pro-preview` | Up to 1 image | `lyrics`, `instrumental`, `durationSeconds`, `format` | `OPENROUTER_API_KEY` |
104104

105105
### Capability matrix
106106

@@ -274,8 +274,8 @@ explicit `model`, `primary`, and `fallbacks` entries.
274274
</Accordion>
275275
<Accordion title="MiniMax">
276276
Uses the batch `music_generation` endpoint. Supports prompt, optional
277-
lyrics, instrumental mode, duration steering, and mp3 output through
278-
either `minimax` API-key auth or `minimax-portal` OAuth.
277+
lyrics, instrumental mode, and mp3 output through either `minimax`
278+
API-key auth or `minimax-portal` OAuth.
279279
</Accordion>
280280
<Accordion title="OpenRouter">
281281
Uses OpenRouter chat completions audio output with streaming enabled. The

extensions/minimax/music-generation-provider.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ describe("minimax music generation provider", () => {
7575
expect(request.url).toBe("https://api.minimax.io/v1/music_generation");
7676
const body = request.body as Record<string, unknown>;
7777
expect(body.model).toBe("music-2.6");
78+
expect(body.prompt).toBe("upbeat dance-pop with female vocals");
79+
expect(body.prompt).not.toContain("Target duration");
80+
expect(body).not.toHaveProperty("duration");
7881
expect(body.lyrics).toBe("our city wakes");
7982
expect(body.output_format).toBe("url");
8083
expect(body.audio_setting).toEqual({
@@ -89,6 +92,7 @@ describe("minimax music generation provider", () => {
8992
expect(result.lyrics).toEqual(["our city wakes"]);
9093
expect(result.metadata?.taskId).toBe("task-123");
9194
expect(result.metadata?.audioUrl).toBe("https://example.com/out.mp3");
95+
expect(result.metadata).not.toHaveProperty("requestedDurationSeconds");
9296
});
9397

9498
it("downloads tracks when url output is returned in data.audio", async () => {

extensions/minimax/music-generation-provider.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
22
import type {
33
GeneratedMusicAsset,
44
MusicGenerationProvider,
5-
MusicGenerationRequest,
65
} from "openclaw/plugin-sdk/music-generation";
76
import { isProviderApiKeyConfigured } from "openclaw/plugin-sdk/provider-auth";
87
import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime";
@@ -106,14 +105,6 @@ async function downloadTrackFromUrl(params: {
106105
};
107106
}
108107

109-
function buildPrompt(req: MusicGenerationRequest): string {
110-
const parts = [req.prompt.trim()];
111-
if (typeof req.durationSeconds === "number" && Number.isFinite(req.durationSeconds)) {
112-
parts.push(`Target duration: about ${Math.max(1, Math.round(req.durationSeconds))} seconds.`);
113-
}
114-
return parts.join("\n\n");
115-
}
116-
117108
function resolveMinimaxMusicModel(model: string | undefined): string {
118109
const trimmed = normalizeOptionalString(model);
119110
if (!trimmed) {
@@ -138,7 +129,6 @@ function buildMinimaxMusicProvider(providerId: string): MusicGenerationProvider
138129
maxTracks: 1,
139130
supportsLyrics: true,
140131
supportsInstrumental: true,
141-
supportsDuration: true,
142132
supportsFormat: true,
143133
supportedFormats: ["mp3"],
144134
},
@@ -187,7 +177,7 @@ function buildMinimaxMusicProvider(providerId: string): MusicGenerationProvider
187177
const lyrics = normalizeOptionalString(req.lyrics);
188178
const body = {
189179
model,
190-
prompt: buildPrompt(req),
180+
prompt: req.prompt.trim(),
191181
...(req.instrumental === true ? { is_instrumental: true } : {}),
192182
...(lyrics ? { lyrics } : req.instrumental === true ? {} : { lyrics_optimizer: true }),
193183
output_format: "url",
@@ -251,9 +241,6 @@ function buildMinimaxMusicProvider(providerId: string): MusicGenerationProvider
251241
...(audioUrl ? { audioUrl } : {}),
252242
instrumental: req.instrumental === true,
253243
...(lyrics ? { requestedLyrics: true } : {}),
254-
...(typeof req.durationSeconds === "number"
255-
? { requestedDurationSeconds: req.durationSeconds }
256-
: {}),
257244
},
258245
};
259246
} finally {

0 commit comments

Comments
 (0)