{"record":{"id":"6aeb70a053dbfabb","repo":"jackwener/OpenCLI","slug":"capabilities-plan-current-plan-does-not-su","errorCode":null,"errorMessage":"${capabilities.plan || 'current'} plan does not support HD video; use --video-resolution sd","messagePattern":"(.+?) plan does not support HD video; use --video-resolution sd","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"clis/midjourney/capabilities.js","lineNumber":320,"sourceCode":"    return GPU_COST_MINUTES[`video${videoResolution === 'hd' ? 'Hd' : 'Sd'}${batchSize}`];\n  }\n  if (sourceUsesOmni && ['rerun', 'vary-subtle', 'vary-strong'].includes(operation)) {\n    return GPU_COST_MINUTES.omni;\n  }\n  if (Object.prototype.hasOwnProperty.call(ACTION_COSTS, operation)) return ACTION_COSTS[operation];\n  if (['animate-low', 'animate-high', 'loop-low', 'loop-high', 'extend-low', 'extend-high'].includes(operation)) {\n    if (!['sd', 'hd'].includes(videoResolution)) throw new ArgumentError('--video-resolution must be sd or hd');\n    if (![1, 2, 4].includes(batchSize)) throw new ArgumentError('--batch-size must be 1, 2, or 4');\n    return GPU_COST_MINUTES[`video${videoResolution === 'hd' ? 'Hd' : 'Sd'}${batchSize}`];\n  }\n  throw new ArgumentError(`No cost model is defined for action \"${operation}\"`);\n}\n\nexport function assertActionPlan(account, operation, { videoResolution = 'sd' } = {}) {\n  const capabilities = planCapabilities(account);\n  if (videoResolution === 'hd' && !capabilities.canHdVideo\n    && ['animate-low', 'animate-high', 'loop-low', 'loop-high', 'extend-low', 'extend-high'].includes(operation)) {\n    throw new ArgumentError(`${capabilities.plan || 'current'} plan does not support HD video; use --video-resolution sd`);\n  }\n  return capabilities;\n}\n\nexport function buildEffectivePrompt(prompt, plan, args, remoteReferences = {}) {\n  let result = String(prompt || '').trim();\n  const imageUrls = remoteReferences.image || [];\n  if (imageUrls.length) result = `${imageUrls.join(' ')} ${result}`.trim();\n\n  const additions = [];\n  if (!promptParamValue(result, ['v', 'version']) && !promptParamValue(result, ['niji']) && args.model && args.model !== 'auto') {\n    if (String(args.model).startsWith('niji')) additions.push(`--niji ${String(args.model).slice(4)}`);\n    else additions.push(`--v ${String(args.model).replace(/^v/, '')}`);\n  } else if (plan.routingReason === 'omni_reference_requires_v7' && !promptParamValue(result, ['v', 'version'])) {\n    additions.push('--v 7');\n  }\n  if (!promptHasFlag(result, ['sd', 'hd']) && args.resolution && args.resolution !== 'auto') additions.push(`--${args.resolution}`);\n  if (!promptHasFlag(result, ['fast', 'relax', 'turbo']) && args.speed && args.speed !== 'auto') additions.push(`--${args.speed}`);","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/midjourney/capabilities.js#L302-L338","documentation":"assertActionPlan checks the caller's Midjourney plan capabilities before allowing HD video operations. If videoResolution is 'hd', the operation is a video action, and planCapabilities(account).canHdVideo is false, it throws this ArgumentError telling the user to fall back to sd.","triggerScenarios":"assertActionPlan(account, 'animate-high', { videoResolution: 'hd' }) for an account whose plan lacks HD video (e.g. basic/standard tiers).","commonSituations":"Users on lower Midjourney subscription tiers running HD animation/loop/extend commands; accounts whose plan metadata failed to load so canHdVideo defaults to false; scripts hardcoded to hd.","solutions":["Re-run with --video-resolution sd","Upgrade the Midjourney subscription to a plan that supports HD video","Verify planCapabilities(account) is populated correctly (plan name/entitlements loaded, not defaulted)","Gate HD options in the CLI behind the account's detected plan before presenting them"],"exampleFix":"// before\nassertActionPlan(account, 'animate-high', { videoResolution: 'hd' });\n// after\nconst caps = planCapabilities(account);\nconst res = caps.canHdVideo ? 'hd' : 'sd';\nassertActionPlan(account, 'animate-high', { videoResolution: res });","handlingStrategy":"validation","validationCode":"import { planCapabilities, assertActionPlan } from './clis/midjourney/capabilities.js';\nconst caps = planCapabilities(account);\nif (!caps.canHdVideo) {\n  console.warn('Plan does not support HD video; falling back to sd');\n  videoResolution = 'sd';\n}\nassertActionPlan(account, operation, { videoResolution });","typeGuard":"function planSupportsHd(account) {\n  return Boolean(planCapabilities(account)?.canHdVideo);\n}","tryCatchPattern":"try {\n  assertActionPlan(account, operation, { videoResolution: 'hd' });\n} catch (err) {\n  if (err instanceof ArgumentError && err.message.includes('does not support HD video')) {\n    console.error('Retry with --video-resolution sd or upgrade your Midjourney plan');\n  } else throw err;\n}","preventionTips":["Inspect planCapabilities(account) before offering HD flags to users","Fall back to 'sd' automatically when canHdVideo is false","Warn users in --help that HD requires a higher plan tier","Verify account/plan metadata loaded correctly to avoid false rejections"],"tags":["plan-limitation","entitlement","video","midjourney"],"backgroundTag":"plan-limitation-rejected","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}