nexu-io/open-design · error · Error

Vela model ${wireModel} does not publish aspect ${aspect}; s

Error message

Vela model ${wireModel} does not publish aspect ${aspect}; supported: ${supported.join(', ')}

What it means

Thrown by selectImageOutputProfile() when the model publishes profiles but none has an aspectRatio matching the requested aspect. The supported aspect ratios are listed in the error (deduplicated). Vela's CLI requires a matching (aspect, resolution) pair, so an unsupported aspect cannot be sent.

Source

Thrown at apps/daemon/src/media/vela.ts:295

 * pricing decision: the model's own default tier is the only choice that keeps
 * an unqualified request costing what an unqualified request costs.
 */
function selectImageOutputProfile(
  published: VelaPublishedImageCapabilities | null,
  aspect: string | undefined,
  requestedResolution: string | undefined,
  wireModel: string,
): VelaImageOutputProfile | undefined {
  if (!aspect) return undefined;
  if (!published || published.profiles.length === 0) {
    throw new Error(
      `Vela model ${wireModel} does not publish output profiles, so aspect ${aspect} cannot be requested`,
    );
  }
  const matching = published.profiles.filter((profile) => profile.aspectRatio === aspect);
  if (matching.length === 0) {
    const supported = [...new Set(published.profiles.map((profile) => profile.aspectRatio))];
    throw new Error(
      `Vela model ${wireModel} does not publish aspect ${aspect}; supported: ${supported.join(', ')}`,
    );
  }
  if (requestedResolution) {
    const supported = matching.map((profile) => profile.resolution);
    const publishedResolution = matchPublishedValue(requestedResolution, supported);
    const exact = matching.find((profile) => profile.resolution === publishedResolution);
    if (!exact) {
      throw new Error(
        `Vela model ${wireModel} does not publish resolution ${requestedResolution} at aspect ${aspect}; supported: ${supported.join(', ')}`,
      );
    }
    return exact;
  }
  // Several resolutions can share one aspect ratio. Prefer the one the model
  // defaults to, so asking only for a shape does not silently change quality
  // tier or price relative to an unqualified request.
  const preferred = matching.find((profile) => profile.resolution === published.defaultResolution);

View on GitHub (pinned to 5be4028344)

Solutions

  1. Use one of the aspect ratios listed in the error message
  2. Check `vela media models --json` for the model's current supported aspects
  3. Switch to a model that publishes the desired aspect

Example fix

// before
await renderVelaImage({ ...input, aspect: '4:3' }); // not published
// after
await renderVelaImage({ ...input, aspect: '16:9' });
Defensive patterns

Strategy: validation

Validate before calling

function aspectIsPublished(aspect: string, published: VelaPublishedImageCapabilities): boolean {
  return published.profiles.some(p => p.aspectRatio === aspect);
}

const supportedAspects = new Set(published.profiles.map(p => p.aspectRatio));
if (aspect && !supportedAspects.has(aspect)) {
  // pick a supported aspect or drop it
}

Try / catch

try {
  const profile = selectImageOutputProfile(published, aspect, resolution, wireModel);
} catch (err) {
  if (err instanceof Error && /does not publish aspect/.test(err.message)) {
    // parse supported aspects from the message and retry with one
  } else throw err;
}

Prevention

When it happens

Trigger: input.aspect is a string (e.g. '4:3') that does not match any profile.aspectRatio in the model's published profiles for the request kind.

Common situations: Model only publishes 16:9 / 9:16 / 1:1 but caller asked for 4:3 or 3:4; aspect typo; catalogue changed the supported aspects.

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/a81bb379a2b197f1. Report an issue: GitHub.