{"record":{"id":"57f3c4290094fb8f","repo":"nexu-io/open-design","slug":"vela-model-wiremodel-does-not-publish-resolutio","errorCode":null,"errorMessage":"Vela model ${wireModel} does not publish resolution ${requestedResolution} at aspect ${aspect}; supported: ${supported.join(', ')}","messagePattern":"Vela model (.+?) does not publish resolution (.+?) at aspect (.+?); supported: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/daemon/src/media/vela.ts","lineNumber":304,"sourceCode":"  if (!aspect) return undefined;\n  if (!published || published.profiles.length === 0) {\n    throw new Error(\n      `Vela model ${wireModel} does not publish output profiles, so aspect ${aspect} cannot be requested`,\n    );\n  }\n  const matching = published.profiles.filter((profile) => profile.aspectRatio === aspect);\n  if (matching.length === 0) {\n    const supported = [...new Set(published.profiles.map((profile) => profile.aspectRatio))];\n    throw new Error(\n      `Vela model ${wireModel} does not publish aspect ${aspect}; supported: ${supported.join(', ')}`,\n    );\n  }\n  if (requestedResolution) {\n    const supported = matching.map((profile) => profile.resolution);\n    const publishedResolution = matchPublishedValue(requestedResolution, supported);\n    const exact = matching.find((profile) => profile.resolution === publishedResolution);\n    if (!exact) {\n      throw new Error(\n        `Vela model ${wireModel} does not publish resolution ${requestedResolution} at aspect ${aspect}; supported: ${supported.join(', ')}`,\n      );\n    }\n    return exact;\n  }\n  // Several resolutions can share one aspect ratio. Prefer the one the model\n  // defaults to, so asking only for a shape does not silently change quality\n  // tier or price relative to an unqualified request.\n  const preferred = matching.find((profile) => profile.resolution === published.defaultResolution);\n  return preferred ?? matching[0];\n}\n\nfunction videoTaskError(task: JsonRecord): string {\n  const raw = task.error;\n  if (typeof raw === 'string' && raw.trim()) return raw.trim();\n  if (raw == null) return 'no provider error was returned';\n  try {\n    return JSON.stringify(raw);","sourceCodeStart":286,"sourceCodeEnd":322,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/media/vela.ts#L286-L322","documentation":"Thrown by selectImageOutputProfile() when the requested aspect is published but the requested resolution does not match any resolution published at that aspect. matchPublishedValue case-folds, so a mismatch means the resolution value is genuinely unsupported for that aspect. The supported resolutions at that aspect are listed in the error.","triggerScenarios":"input.aspect matches a published aspect and input.resolution is set, but no profile with that aspect has the requested resolution (e.g. requesting 4K at an aspect that only publishes 1K and 2K).","commonSituations":"Resolution not offered at that aspect; typo; catalogue changed available resolutions; caller mixed a resolution from one aspect with another.","solutions":["Use one of the resolutions listed in the error message for that aspect","Omit input.resolution to get the model's default resolution for that aspect","Check `vela media models --json` for current resolution options at the aspect"],"exampleFix":"// before\nawait renderVelaImage({ ...input, aspect: '16:9', resolution: '4K' }); // only 1K/2K published\n// after\nawait renderVelaImage({ ...input, aspect: '16:9', resolution: '2K' });","handlingStrategy":"validation","validationCode":"function resolutionIsPublishedAtAspect(\n  resolution: string,\n  aspect: string,\n  published: VelaPublishedImageCapabilities,\n): boolean {\n  return published.profiles.some(\n    p => p.aspectRatio === aspect && p.resolution.toLowerCase() === resolution.toLowerCase(),\n  );\n}\n\nif (resolution && !resolutionIsPublishedAtAspect(resolution, aspect, published)) {\n  // pick a supported resolution or drop it to use the default\n}","typeGuard":null,"tryCatchPattern":"try {\n  const profile = selectImageOutputProfile(published, aspect, resolution, wireModel);\n} catch (err) {\n  if (err instanceof Error && /does not publish resolution/.test(err.message)) {\n    // parse supported resolutions from the message and retry, or drop resolution\n  } else throw err;\n}","preventionTips":["Derive the resolution picker options from the published profiles for the selected aspect","When in doubt, omit resolution so the model default applies","Cache the per-aspect resolution list from the catalogue to drive the UI"],"tags":["vela","resolution","capabilities","validation"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}