jackwener/OpenCLI · error · ArgumentError
minimax music --aigc-watermark is only supported with --regi
Error message
minimax music --aigc-watermark is only supported with --region cn
What it means
The AIGC watermark feature is only offered on MiniMax's China endpoint. If --aigc-watermark is true while the resolved region (--region) is not 'cn', the CLI throws this ArgumentError to prevent calling an international endpoint with an unsupported parameter.
Source
Thrown at clis/minimax/music.js:112
const timeoutSeconds = boundedInteger(kwargs.timeout, 600, 1, 1800, '--timeout');
const instrumental = boolean(kwargs.instrumental, '--instrumental');
const lyricsOptimizer = boolean(kwargs['lyrics-optimizer'], '--lyrics-optimizer');
const aigcWatermark = boolean(kwargs['aigc-watermark'], '--aigc-watermark');
const execute = boolean(kwargs.execute, '--execute');
const prompt = text(kwargs.prompt, 2000, 'prompt');
const lyrics = text(kwargs.lyrics, 3500, '--lyrics');
if (instrumental && (!prompt || lyrics || lyricsOptimizer)) {
throw new ArgumentError('minimax music --instrumental requires prompt and cannot be combined with --lyrics or --lyrics-optimizer');
}
if (lyricsOptimizer && (!prompt || lyrics)) {
throw new ArgumentError('minimax music --lyrics-optimizer requires prompt and cannot be combined with --lyrics');
}
if (!instrumental && !lyrics && !lyricsOptimizer) {
throw new ArgumentError('minimax music vocal generation requires --lyrics, or prompt with --lyrics-optimizer');
}
if (aigcWatermark && regionKey !== 'cn') {
throw new ArgumentError('minimax music --aigc-watermark is only supported with --region cn');
}
if (kwargs.op != null && outputFormat !== 'hex') {
throw new ArgumentError('minimax music --op requires --output-format hex');
}
const outputDir = outputFormat === 'hex' ? resolveOutputDir(kwargs.op) : null;
if (!execute) throw new ArgumentError('Refusing to spend MiniMax quota without --execute');
const region = MUSIC_REGIONS[regionKey];
const apiKey = requireApiKey();
const reservation = outputFormat === 'hex' ? reserveAudioFile(outputDir, model, audioFormat) : null;
let committed = false;
try {
const payload = await generateMusic(region, apiKey, buildRequest({
model, prompt, lyrics, outputFormat, audioFormat, sampleRate, bitrate,
instrumental, lyricsOptimizer, aigcWatermark,
}), timeoutSeconds);
const completed = parseCompletedMusic(payload, region);
let audioUrl = null;View on GitHub (pinned to 49907e53dc)
Solutions
- Add --region cn to the invocation, or
- Remove --aigc-watermark if you must use a non-CN region
- Gate the flag in your wrapper: only pass --aigc-watermark when region is cn
- Check MUSIC_REGIONS in clis/minimax/music.js for the exact region keys supported
Example fix
// before minimax music --lyrics "..." --aigc-watermark true // after minimax music --lyrics "..." --aigc-watermark true --region cn
Defensive patterns
Strategy: validation
Validate before calling
if (opts.aigcWatermark && opts.region !== 'cn') {
throw new Error('--aigc-watermark requires --region cn');
} // run before invoking the CLI Try / catch
try {
runMinimaxMusic(args);
} catch (e) {
if (e.message.includes('--aigc-watermark is only supported')) {
console.error('Either add --region cn or drop --aigc-watermark for non-CN endpoints');
process.exitCode = 2;
} else throw e;
} Prevention
- Gate the watermark flag on region in wrapper scripts instead of hardcoding it
- Document that AIGC watermark is CN-endpoint-only for your team
- Re-check defaults whenever the shared region config changes
- List supported region keys from MUSIC_REGIONS in clis/minimax/music.js
When it happens
Trigger: --aigc-watermark true with the default (non-cn) region or --region set to anything other than cn (e.g. 'global'/'us'); a config file enabling the watermark globally for all jobs.
Common situations: Scripts shared between CN and international teams with the watermark flag baked in; users unaware watermark is region-gated; a default region changed in config while the flag stayed on.
Related errors
- minimax music --instrumental requires prompt and cannot be c
- minimax music --lyrics-optimizer requires prompt and cannot
- minimax music ${flag} must be one of: ${allowed.join(', ')}
- minimax music ${flag} must be true or false
- minimax music ${flag} must be an integer from ${min} to ${ma
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/53e9451c57405cba.
Report an issue: GitHub.