Files
openmotion/docs/generation-options.md
open-design-crew[bot] 08d9e5d44b fix(studio): keep template and generation pages usable for guests (#1070)
* fix(studio): keep template and generation pages usable for guests

* fix: preserve workspace failure feedback and narrow speech settings

---------

Co-authored-by: lefarcen <935902669@qq.com>
2026-11-25 14:56:46 +08:00

37 lines
6.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Generation options
Studio, external MCP callers and the embedded asset Agent receive the same optional `Model.generationOptions` from Model Gateway discovery. `shared/generation-options.ts` maintains exact provider/model profiles. The service validates known fields before queueing a new job; idempotent replay returns the original job. Unknown model IDs receive no guessed profile. Advanced JSON remains available for provider-specific fields, including custom FLUX image dimensions.
Quick controls override matching advanced fields; request parameters override saved model defaults. Unchanged fields are omitted and inherit saved/provider defaults. Studio preserves separate parameter drafts for each model while the creator is open. These drafts are not account settings. Returned jobs and asset versions record actual submitted parameters. Local Codex image preferences are appended to its instruction: they are creative requests, not guaranteed raster specifications.
## Maintained profiles
Checked on 2026-11-15 against the following official endpoint schemas and current adapters:
| Exact endpoint | Quick controls | Source |
| --- | --- | --- |
| `codex:image-generation` | Requested aspect ratio and background, delivered as prompt preferences | `gateway/agents.ts`, `gateway/service.ts` |
| `atlascloud:google/nano-banana-2/text-to-image` | Aspect ratio, resolution, format, thinking level, web search, seed | [Atlas schema](https://www.atlascloud.ai/docs/more-models/google/nano-banana-2-text-to-image/generateImage) |
| `atlascloud:bytedance/seedance-2.0/text-to-video` | Ratio, resolution, integer duration, audio, bitrate, seed | [Atlas schema](https://www.atlascloud.ai/docs/more-models/bytedance/seedance-2.0-text-to-video/generateVideo) |
| `atlascloud:suno/chirp-v4` | Instrumental-only and vocal gender; prompt remains an inspiration brief | [Atlas schema](https://www.atlascloud.ai/docs/more-models/suno/chirp-v4/generateAudio) |
| `fal:fal-ai/flux/schnell` | Image size, output count, format, seed | [fal schema](https://fal.ai/models/fal-ai/flux/schnell/api) |
| `fal:fal-ai/wan/v2.2-a14b/text-to-video` | Ratio, resolution, frames, frame rate, prompt expansion, negative prompt, seed | [fal schema](https://fal.ai/models/fal-ai/wan/v2.2-a14b/text-to-video/api) |
| `fal:fal-ai/kokoro/american-english` | Voice (20 American English presets with bundled Apache-2.0 Kokoro-82M audition samples in Sound Studio) and speed; spoken input uses `prompt` | [fal schema](https://fal.ai/models/fal-ai/kokoro/american-english/api) |
| `fal:fal-ai/elevenlabs/sound-effects/v2` | Duration (0.5–22s) and seamless loop; sound cue input uses `text` | [fal schema](https://fal.ai/models/fal-ai/elevenlabs/sound-effects/v2/api) |
| OpenDesign Cloud/account image | Aspect ratio, resolution (paired from the active `generations` or `edits` envelope in `capabilities.profiles`; Cloud packs paired fields into `output: { aspect_ratio, resolution }`, and both Cloud and account reject incomplete pairs when no profiles are published as well as `size` combined with `aspect_ratio`, `resolution` or `output`), legacy image size (when no profiles are published), and quality | Current Cloud/account `/api/v1/media/models` catalogue contract |
| OpenDesign Cloud/account video | Dynamic `ratio`, `resolution`, integer `duration` (slider for contiguous ranges, discrete pills for small sets) from published `capabilities` (plain AMR arrays default to their first published value), plus `generate_audio` (enabled by default for Seedance 2.5; always on in Studio and passed as `--generate-audio` through `@powerformer/vela-cli@0.1.10` for `wan-2.7` because CLI 0.1.10 otherwise defaults to `generate_audio: false` which AMR rejects) | Current Cloud/account `/api/v1/media/models` catalogue contract |
| OpenDesign Cloud/account speech | `elevenlabs-v3` (with official premade `previewUrl`s) and `byteplus-tts-2` (with bundled Vivi audition sample in Sound Studio) offer voices checked against the media API, defaulting to the first; another non-empty voice ID for the same model is passed through unchecked. Other speech models require a voice ID | Current Cloud/account adapter contract |
| OpenDesign music | Optional duration in seconds in Sound Studio. The OpenDesign API receives `music_length_ms`; the account connector receives `duration` in seconds. | OpenDesign media API and connector `audio music --duration` |
These controls cover a maintained subset, not all models or all provider parameters. Custom model names and live catalogue labels do not establish wire compatibility. Provider-native types remain intact: Seedance duration is an integer, audio is a boolean, and Wan takes frames rather than a fabricated duration field. Local asset references are limited to image models that report `supportsImageReference`: the Codex image adapter and OpenDesign account image models whose catalogue publishes `edits`. No local-upload support is inferred from a model accepting remote reference URLs.
The embedded Codex conversation separately exposes model selection and discovered reasoning efforts. Effort is passed as `turn/start.effort`, with `null` restoring the model default on subsequent turns. This field was checked against the installed Codex app-server JSON schema. Other Agents continue to use external MCP; selecting a local CLI in settings does not add an embedded runner.
Guest creation pages use the public OpenDesign model descriptions to preview settings before sign-in. The authenticated gateway determines which models the workspace can run. For `opendesign:elevenlabs-v3`, the speech speed control maps to `parameters.voice_settings.speed` on submission.
## Interaction and validation
Generation settings use an anchored, non-modal popover with ratio tiles, selections, switches and bounded numeric controls. Known failures use the shared Toast layer. The asset navigation and creation pane have drag separators, keyboard arrows (Shift for larger steps), Home/End limits and double-click reset. Width preferences survive reloads; available content space bounds their rendered widths, and narrow creation uses the whole workspace.
Deterministic tests cover model discovery, invalid native parameter types, queued parameter identity, replay without another submission, Kokoro wire mapping, reasoning forwarding, JSON/control precedence and pane persistence/bounds. Browser inspection covers opened nested menus, actual drags, both themes and narrow layouts. Live paid generation, provider entitlement and human visual acceptance remain separate.