{"record":{"id":"153e38128bd68be2","repo":"nexu-io/open-design","slug":"vela-model-wiremodel-does-not-publish-output-pr","errorCode":null,"errorMessage":"Vela model ${wireModel} does not publish output profiles, so aspect ${aspect} cannot be requested","messagePattern":"Vela model (.+?) does not publish output profiles, so aspect (.+?) cannot be requested","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/daemon/src/media/vela.ts","lineNumber":288,"sourceCode":"\n/**\n * Pick the (aspect ratio, resolution) pair to request, or undefined to send no\n * output flags at all and leave the server's default profile in charge.\n *\n * Vela's CLI treats the pair as one indivisible request, so a caller who names\n * only a shape still has to be given a resolution. Which one they get is a\n * pricing decision: the model's own default tier is the only choice that keeps\n * an unqualified request costing what an unqualified request costs.\n */\nfunction selectImageOutputProfile(\n  published: VelaPublishedImageCapabilities | null,\n  aspect: string | undefined,\n  requestedResolution: string | undefined,\n  wireModel: string,\n): VelaImageOutputProfile | undefined {\n  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      );","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/media/vela.ts#L270-L306","documentation":"Thrown by selectImageOutputProfile() when an aspect ratio was requested but the model either is not in the published catalogue (published is null) or publishes zero output profiles. Vela's CLI requires both an aspect ratio and a resolution together; without published profiles there is no valid resolution to pair with the aspect, so the request is rejected before the CLI call.","triggerScenarios":"Calling renderVelaImage with input.aspect set, where fetchPublishedImageCapabilities returned null (model not in catalogue) or returned a capabilities object whose profiles list is empty for the request kind (generations vs edits).","commonSituations":"Model does not support output profiles at all; the model supports profiles for generations but not edits (or vice versa); model is not in the catalogue; catalogue fetch returned a malformed envelope.","solutions":["Omit input.aspect to let the server's default profile decide","Verify the model publishes profiles for the request kind (edits vs generations) via `vela media models --json`","Use a model that publishes output profiles if a specific aspect is required"],"exampleFix":"// before\nawait renderVelaImage({ ...input, model: 'vela/profile-less-model', aspect: '16:9' });\n// after\nawait renderVelaImage({ ...input, model: 'vela/profile-less-model' }); // no aspect","handlingStrategy":"validation","validationCode":"function modelPublishesProfiles(published: VelaPublishedImageCapabilities | null): boolean {\n  return published != null && published.profiles.length > 0;\n}\n\nif (aspect && !modelPublishesProfiles(published)) {\n  // drop aspect to let the server default profile apply\n}","typeGuard":null,"tryCatchPattern":"try {\n  const profile = selectImageOutputProfile(published, aspect, resolution, wireModel);\n} catch (err) {\n  if (err instanceof Error && /does not publish output profiles/.test(err.message)) {\n    // retry without aspect\n  } else throw err;\n}","preventionTips":["Default input.aspect to undefined so profile-less models use the server default","Confirm via `vela media models --json` that a model publishes profiles before exposing aspect controls","Remember profiles are per request kind (edits vs generations) — check the right envelope"],"tags":["vela","aspect-ratio","capabilities","validation"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}