Model-scoped options object for generative assets - #128
Merged
Conversation
|
🎉 This PR is included in version 1.16.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Restructures generation settings on image, video and audio assets: the asset root keeps prompt and model, and a new options object carries all model-specific settings (voice, resolution, duration, music settings, image-to-video input, etc.). The flat generation fields are removed. Also redefines src + prompt together as valid (src is a preview placeholder; the prompt regenerates the asset at render, cache-permitting) and documents the on-demand generate endpoints.
Why
Only prompt and model are common to every generation model; the per-model fields were accumulating on the asset root with conflicting meanings and units. Options are model-scoped, validated server-side against each model's published schema, so new models never change the asset schema.
Verify
pnpm build && pnpm test:smoke && pnpm test