{"record":{"id":"6dde4ad7a4b0bb89","repo":"nexu-io/open-design","slug":"vela-model-wiremodel-does-not-publish-quality","errorCode":null,"errorMessage":"Vela model ${wireModel} does not publish quality ${tier}; supported: ${published.qualityValues.join(', ')}","messagePattern":"Vela model (.+?) does not publish quality (.+?); supported: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/daemon/src/media/vela.ts","lineNumber":247,"sourceCode":" * request for a tier the model publishes sends it verbatim; a request the\n * model cannot honour fails here, before it costs anything, with the tiers it\n * does publish.\n */\nfunction qualityArgs(\n  requested: string | undefined,\n  published: VelaPublishedImageCapabilities,\n  wireModel: string,\n): string[] {\n  const tier = requested?.trim();\n  if (!tier) return [];\n  if (!published.qualityValues) {\n    throw new Error(\n      `Vela model ${wireModel} does not publish a quality capability, so quality ${tier} cannot be requested`,\n    );\n  }\n  const publishedTier = matchPublishedValue(tier, published.qualityValues);\n  if (!publishedTier) {\n    throw new Error(\n      `Vela model ${wireModel} does not publish quality ${tier}; supported: ${published.qualityValues.join(', ')}`,\n    );\n  }\n  return ['--quality', publishedTier];\n}\n\n// Vela owns which shapes and tiers a model can actually deliver, so read the\n// published capabilities per request instead of caching a copy here: a\n// catalogue that gained or lost one must take effect immediately, and one\n// extra CLI call is nothing beside the generation it precedes.\nasync function fetchPublishedImageCapabilities(\n  input: VelaImageRenderInput,\n  edits: boolean,\n  wireModel: string,\n  runCommand: VelaCommandRunner,\n): Promise<VelaPublishedImageCapabilities | null> {\n  const stdout = await runCommand(['media', 'models', '--json'], {\n    ...velaWorkspaceCommandOptions(input.workspaceId),","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/media/vela.ts#L229-L265","documentation":"Thrown by qualityArgs() when the model does publish a quality capability (qualityValues is non-null) but the requested tier does not case-insensitively match any published value. The error lists the supported tiers so the caller can correct the request. matchPublishedValue folds case, so '2k' matches '2K'; a mismatch means a genuinely unsupported tier name.","triggerScenarios":"input.quality is a string that is not in the model's published qualityValues list (e.g. requesting 'ultra' when only 'standard' and 'high' are published).","commonSituations":"Typo in the quality tier; tier renamed in a newer catalogue; caller copied a tier name from a different model; case-only differences are handled but spelling differences are not.","solutions":["Read the supported list in the error message and use one of those exact values","Check `vela media models --json` for the model's current quality.values","If the tier name was correct before, the catalogue may have changed — update the caller"],"exampleFix":"// before\nawait renderVelaImage({ ...input, quality: 'ultra' }); // only standard/high published\n// after\nawait renderVelaImage({ ...input, quality: 'high' });","handlingStrategy":"validation","validationCode":"function qualityIsPublished(tier: string, published: string[] | null): boolean {\n  if (!published) return false;\n  const folded = tier.toLowerCase();\n  return published.some(v => v.toLowerCase() === folded);\n}\n\nif (requestedQuality && !qualityIsPublished(requestedQuality, published?.qualityValues ?? null)) {\n  // correct the tier or drop it\n}","typeGuard":null,"tryCatchPattern":"try {\n  const args = qualityArgs(requestedQuality, published, wireModel);\n} catch (err) {\n  if (err instanceof Error && /does not publish quality/.test(err.message)) {\n    // parse the supported list from the message and pick one, or drop quality\n  } else throw err;\n}","preventionTips":["Read the supported quality values from the catalogue before offering them in the UI","Treat the catalogue as the source of truth — do not hardcode tier names per model","Provide a dropdown of published tiers so users cannot type unsupported values"],"tags":["vela","quality","capabilities","validation"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}