-
Notifications
You must be signed in to change notification settings - Fork 745
generatePrompt omits props from Remotion schema, causing prop name mismatches at runtime #224
Description
Summary
The Remotion schema defines props on composition entries (see schema.ts#L184), but generatePrompt does not include those props in its output (schema.ts#L55–56). As a result, the model has no knowledge of the expected prop shape when generating JSON, and passes mismatched or missing prop names to components at runtime.
Expected behavior
generatePrompt should reflect the full schema available to the model, including props for each composition. If a composition accepts typed props, the prompt should describe them so the model can produce valid, matching output.
Actual behavior
props is defined in the schema but excluded from the generated prompt. The model generates prop names without any grounding in the actual component API, which causes runtime failures when those props are passed to Remotion components.
Reproduction
- Define a Remotion composition with typed props in your registry
- Call generatePrompt and inspect the output
- Note that props are absent from the prompt
- Use the prompt to generate a scene -- observe that prop names in the output do not match the component's expected interface
Question
Is this intentional? If props are meant to be opaque to the model (e.g. for security or flexibility reasons), that should be documented. If it's an oversight, the fix is straightforward: include props in the prompt output alongside the rest of the composition schema.
Context
Using json-render with Remotion in a Next.js app. The prop mismatch breaks component rendering silently -- no schema validation error, just wrong or missing values passed through.